parent
ce6165d9c3
commit
cf4a65f706
@ -1,44 +1,44 @@
|
|||||||
class LifePayRecordModel {
|
// class LifePayRecordModel {
|
||||||
int? id;
|
// int? id;
|
||||||
String? chargesTemplateDetailName;
|
// String? chargesTemplateDetailName;
|
||||||
String? roomName;
|
// String? roomName;
|
||||||
String? years;
|
// String? years;
|
||||||
num? paidPrice;
|
// num? paidPrice;
|
||||||
String? createDate;
|
// String? createDate;
|
||||||
int? payType;
|
// int? payType;
|
||||||
String? code;
|
// String? code;
|
||||||
|
|
||||||
LifePayRecordModel(
|
// LifePayRecordModel(
|
||||||
{this.id,
|
// {this.id,
|
||||||
this.chargesTemplateDetailName,
|
// this.chargesTemplateDetailName,
|
||||||
this.roomName,
|
// this.roomName,
|
||||||
this.years,
|
// this.years,
|
||||||
this.paidPrice,
|
// this.paidPrice,
|
||||||
this.createDate,
|
// this.createDate,
|
||||||
this.payType,
|
// this.payType,
|
||||||
this.code});
|
// this.code});
|
||||||
|
|
||||||
LifePayRecordModel.fromJson(Map<String, dynamic> json) {
|
// LifePayRecordModel.fromJson(Map<String, dynamic> json) {
|
||||||
id = json['id'];
|
// id = json['id'];
|
||||||
chargesTemplateDetailName = json['chargesTemplateDetailName'];
|
// chargesTemplateDetailName = json['chargesTemplateDetailName'];
|
||||||
roomName = json['roomName'];
|
// roomName = json['roomName'];
|
||||||
years = json['years'];
|
// years = json['years'];
|
||||||
paidPrice = json['paidPrice'];
|
// paidPrice = json['paidPrice'];
|
||||||
createDate = json['createDate'];
|
// createDate = json['createDate'];
|
||||||
payType = json['payType'];
|
// payType = json['payType'];
|
||||||
code = json['code'];
|
// code = json['code'];
|
||||||
}
|
// }
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
// Map<String, dynamic> toJson() {
|
||||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
// final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
data['id'] = this.id;
|
// data['id'] = this.id;
|
||||||
data['chargesTemplateDetailName'] = this.chargesTemplateDetailName;
|
// data['chargesTemplateDetailName'] = this.chargesTemplateDetailName;
|
||||||
data['roomName'] = this.roomName;
|
// data['roomName'] = this.roomName;
|
||||||
data['years'] = this.years;
|
// data['years'] = this.years;
|
||||||
data['paidPrice'] = this.paidPrice;
|
// data['paidPrice'] = this.paidPrice;
|
||||||
data['createDate'] = this.createDate;
|
// data['createDate'] = this.createDate;
|
||||||
data['payType'] = this.payType;
|
// data['payType'] = this.payType;
|
||||||
data['code'] = this.code;
|
// data['code'] = this.code;
|
||||||
return data;
|
// 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