parent
ce6165d9c3
commit
cf4a65f706
@ -1,44 +1,44 @@
|
||||
class LifePayRecordModel {
|
||||
int? id;
|
||||
String? chargesTemplateDetailName;
|
||||
String? roomName;
|
||||
String? years;
|
||||
num? paidPrice;
|
||||
String? createDate;
|
||||
int? payType;
|
||||
String? code;
|
||||
// class LifePayRecordModel {
|
||||
// int? id;
|
||||
// String? chargesTemplateDetailName;
|
||||
// String? roomName;
|
||||
// String? years;
|
||||
// num? paidPrice;
|
||||
// String? createDate;
|
||||
// int? payType;
|
||||
// String? code;
|
||||
|
||||
LifePayRecordModel(
|
||||
{this.id,
|
||||
this.chargesTemplateDetailName,
|
||||
this.roomName,
|
||||
this.years,
|
||||
this.paidPrice,
|
||||
this.createDate,
|
||||
this.payType,
|
||||
this.code});
|
||||
// LifePayRecordModel(
|
||||
// {this.id,
|
||||
// this.chargesTemplateDetailName,
|
||||
// this.roomName,
|
||||
// this.years,
|
||||
// this.paidPrice,
|
||||
// this.createDate,
|
||||
// this.payType,
|
||||
// this.code});
|
||||
|
||||
LifePayRecordModel.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
chargesTemplateDetailName = json['chargesTemplateDetailName'];
|
||||
roomName = json['roomName'];
|
||||
years = json['years'];
|
||||
paidPrice = json['paidPrice'];
|
||||
createDate = json['createDate'];
|
||||
payType = json['payType'];
|
||||
code = json['code'];
|
||||
}
|
||||
// LifePayRecordModel.fromJson(Map<String, dynamic> json) {
|
||||
// id = json['id'];
|
||||
// chargesTemplateDetailName = json['chargesTemplateDetailName'];
|
||||
// roomName = json['roomName'];
|
||||
// years = json['years'];
|
||||
// paidPrice = json['paidPrice'];
|
||||
// createDate = json['createDate'];
|
||||
// payType = json['payType'];
|
||||
// code = json['code'];
|
||||
// }
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['chargesTemplateDetailName'] = this.chargesTemplateDetailName;
|
||||
data['roomName'] = this.roomName;
|
||||
data['years'] = this.years;
|
||||
data['paidPrice'] = this.paidPrice;
|
||||
data['createDate'] = this.createDate;
|
||||
data['payType'] = this.payType;
|
||||
data['code'] = this.code;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
// Map<String, dynamic> toJson() {
|
||||
// final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
// data['id'] = this.id;
|
||||
// data['chargesTemplateDetailName'] = this.chargesTemplateDetailName;
|
||||
// data['roomName'] = this.roomName;
|
||||
// data['years'] = this.years;
|
||||
// data['paidPrice'] = this.paidPrice;
|
||||
// data['createDate'] = this.createDate;
|
||||
// data['payType'] = this.payType;
|
||||
// data['code'] = this.code;
|
||||
// return data;
|
||||
// }
|
||||
// }
|
||||
|
@ -0,0 +1,43 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
part 'life_pay_record_model.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class LifePayRecordModel extends Equatable {
|
||||
final int id;
|
||||
final String chargesTemplateDetailName;
|
||||
final String roomName;
|
||||
final int years;
|
||||
final num paidPrice;
|
||||
final String createName;
|
||||
final String createDate;
|
||||
final int payType;
|
||||
final String code;
|
||||
LifePayRecordModel({
|
||||
required this.id,
|
||||
required this.chargesTemplateDetailName,
|
||||
required this.roomName,
|
||||
required this.years,
|
||||
required this.paidPrice,
|
||||
required this.createName,
|
||||
required this.createDate,
|
||||
required this.payType,
|
||||
required this.code,
|
||||
});
|
||||
factory LifePayRecordModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$LifePayRecordModelFromJson(json);
|
||||
@override
|
||||
List<Object> get props {
|
||||
return [
|
||||
id,
|
||||
chargesTemplateDetailName,
|
||||
roomName,
|
||||
years,
|
||||
paidPrice,
|
||||
createName,
|
||||
createDate,
|
||||
payType,
|
||||
code,
|
||||
];
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'life_pay_record_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
LifePayRecordModel _$LifePayRecordModelFromJson(Map<String, dynamic> json) {
|
||||
return LifePayRecordModel(
|
||||
id: json['id'] as int,
|
||||
chargesTemplateDetailName: json['chargesTemplateDetailName'] as String,
|
||||
roomName: json['roomName'] as String,
|
||||
years: json['years'] as int,
|
||||
paidPrice: json['paidPrice'] as num,
|
||||
createName: json['createName'] as String,
|
||||
createDate: json['createDate'] as String,
|
||||
payType: json['payType'] as int,
|
||||
code: json['code'] as String,
|
||||
);
|
||||
}
|
Loading…
Reference in new issue