get_banquet_deposit_model.dart
2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import 'package:common_utils/common_utils.dart';
class GetBanquetDepositModel {
int? ret;
List<GetBanquetDepositSunModel>? data;
String? msg;
GetBanquetDepositModel({this.ret, this.data, this.msg});
GetBanquetDepositModel.fromJson(Map<String, dynamic> json) {
ret = json['ret'];
if (json['data'] != null) {
data = <GetBanquetDepositSunModel>[];
json['data'].forEach((v) {
data!.add(new GetBanquetDepositSunModel.fromJson(v));
});
}
msg = json['msg'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ret'] = this.ret;
if (this.data != null) {
data['data'] = this.data!.map((v) => v.toJson()).toList();
}
data['msg'] = this.msg;
return data;
}
}
class GetBanquetDepositSunModel {
String? id;
String? sid;
String? rid;
String? price;
String? rname;
String? collectionUid;
String? rtime;
String? pay;
String? depositId;
String? no;
String? nickName;
String? dname;
String get ddateStr {
if (rtime.toString() == '0') {
return '';
}
DateTime dateTime =
DateTime.fromMillisecondsSinceEpoch(int.parse(rtime.toString()) * 1000);
return DateUtil.formatDate(dateTime, format: DateFormats.y_mo_d);
}
GetBanquetDepositSunModel(
{this.id,
this.sid,
this.rid,
this.price,
this.rname,
this.collectionUid,
this.rtime,
this.pay,
this.depositId,
this.no,
this.nickName,
this.dname});
GetBanquetDepositSunModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
sid = json['sid'];
rid = json['rid'];
price = json['price'];
rname = json['rname'];
collectionUid = json['collection_uid'];
rtime = json['rtime'];
pay = json['pay'];
depositId = json['deposit_id'];
no = json['no'];
nickName = json['nick_name'];
dname = json['dname'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['sid'] = this.sid;
data['rid'] = this.rid;
data['price'] = this.price;
data['rname'] = this.rname;
data['collection_uid'] = this.collectionUid;
data['rtime'] = this.rtime;
data['pay'] = this.pay;
data['deposit_id'] = this.depositId;
data['no'] = this.no;
data['nick_name'] = this.nickName;
data['dname'] = this.dname;
return data;
}
}