parent
876eb16fdd
commit
d3843c9e5e
@ -0,0 +1,25 @@
|
|||||||
|
import 'package:equatable/equatable.dart';
|
||||||
|
import 'package:json_annotation/json_annotation.dart';
|
||||||
|
part 'lease_echo_model.g.dart';
|
||||||
|
|
||||||
|
@JsonSerializable()
|
||||||
|
class LeaseEchoModel extends Equatable {
|
||||||
|
final String? name;
|
||||||
|
final num? sex;
|
||||||
|
final String tel;
|
||||||
|
final String? idNumber;
|
||||||
|
LeaseEchoModel({
|
||||||
|
required this.name,
|
||||||
|
required this.sex,
|
||||||
|
required this.tel,
|
||||||
|
required this.idNumber,
|
||||||
|
});
|
||||||
|
factory LeaseEchoModel.fromJson(Map<String, dynamic> json) =>
|
||||||
|
_$LeaseEchoModelFromJson(json);
|
||||||
|
|
||||||
|
factory LeaseEchoModel.fail() =>
|
||||||
|
LeaseEchoModel(name: '', sex: 0, tel: '', idNumber: '');
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object?> get props => [name, sex, tel, idNumber];
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'lease_echo_model.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// JsonSerializableGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
LeaseEchoModel _$LeaseEchoModelFromJson(Map<String, dynamic> json) {
|
||||||
|
return LeaseEchoModel(
|
||||||
|
name: json['name'] as String?,
|
||||||
|
sex: json['sex'] as num?,
|
||||||
|
tel: json['tel'] as String,
|
||||||
|
idNumber: json['idNumber'] as String?,
|
||||||
|
);
|
||||||
|
}
|
Loading…
Reference in new issue