IsExamineModel.dart
4.77 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
import 'dart:convert';
import 'package:common_utils/common_utils.dart';
import 'package:one_key/models/coupon_model.dart';
class IsExamineModel {
int ret;
List<IsExamineSunModel> data;
String msg;
IsExamineModel({this.ret, this.data, this.msg});
IsExamineModel.fromJson(Map<String, dynamic> json) {
ret = json['ret'];
if (json['data'] != null) {
data = [];
json['data'].forEach((v) {
data.add(new IsExamineSunModel.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 IsExamineSunModel {
String id;
String status;
String rechargeId;
String rechargeName;
String price;
String sellerid;
String sellername;
String openid;
String orderNo;
String combineOutTradeNo;
String outTradeNo;
dynamic outRefundNo;
ExpDate expDate;
String stime;
String etime;
String transactionId;
dynamic refundId;
dynamic reOutTradeNo;
String tradeState;
dynamic tradeStateDesc;
String qrcode;
String isExamine;
dynamic examineName;
dynamic examineTime;
String isComment;
String type;
String cdate;
String desc;
String explain;
String get examineTimeStr {
if (examineTime == null) {
return '';
}
DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(
int.parse(examineTime.toString()) * 1000);
return DateUtil.formatDate(dateTime, format: DateFormats.y_mo_d);
}
IsExamineSunModel(
{this.id,
this.status,
this.rechargeId,
this.rechargeName,
this.price,
this.sellerid,
this.sellername,
this.openid,
this.orderNo,
this.combineOutTradeNo,
this.outTradeNo,
this.outRefundNo,
this.expDate,
this.stime,
this.etime,
this.transactionId,
this.refundId,
this.reOutTradeNo,
this.tradeState,
this.tradeStateDesc,
this.qrcode,
this.isExamine,
this.examineName,
this.examineTime,
this.isComment,
this.type,
this.cdate,
this.desc,
this.explain});
IsExamineSunModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
status = json['status'];
rechargeId = json['recharge_id'];
rechargeName = json['recharge_name'];
price = json['price'];
sellerid = json['sellerid'];
sellername = json['sellername'];
openid = json['openid'];
orderNo = json['order_no'];
combineOutTradeNo = json['combine_out_trade_no'];
outTradeNo = json['out_trade_no'];
outRefundNo = json['out_refund_no'];
expDate = json['exp_date'] == null
? null
: (json['exp_date'] is String)
? ExpDate.fromJson(jsonDecode(json['exp_date']))
: (json['exp_date'] is Map)
? ExpDate.fromJson(json['exp_date'])
: null;
stime = json['stime'];
etime = json['etime'];
transactionId = json['transaction_id'];
refundId = json['refund_id'];
reOutTradeNo = json['re_out_trade_no'];
tradeState = json['trade_state'];
tradeStateDesc = json['trade_state_desc'];
qrcode = json['qrcode'];
isExamine = json['is_examine'];
examineName = json['examine_name'];
examineTime = json['examine_time'];
isComment = json['is_comment'];
type = json['type'];
cdate = json['cdate'];
desc = json['desc'];
explain = json['explain'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['status'] = this.status;
data['recharge_id'] = this.rechargeId;
data['recharge_name'] = this.rechargeName;
data['price'] = this.price;
data['sellerid'] = this.sellerid;
data['sellername'] = this.sellername;
data['openid'] = this.openid;
data['order_no'] = this.orderNo;
data['combine_out_trade_no'] = this.combineOutTradeNo;
data['out_trade_no'] = this.outTradeNo;
data['out_refund_no'] = this.outRefundNo;
data['exp_date'] = this.expDate;
data['stime'] = this.stime;
data['etime'] = this.etime;
data['transaction_id'] = this.transactionId;
data['refund_id'] = this.refundId;
data['re_out_trade_no'] = this.reOutTradeNo;
data['trade_state'] = this.tradeState;
data['trade_state_desc'] = this.tradeStateDesc;
data['qrcode'] = this.qrcode;
data['is_examine'] = this.isExamine;
data['examine_name'] = this.examineName;
data['examine_time'] = this.examineTime;
data['is_comment'] = this.isComment;
data['type'] = this.type;
data['cdate'] = this.cdate;
data['desc'] = this.desc;
data['explain'] = this.explain;
return data;
}
}