store_customer_home_model.dart
2.76 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
import 'package:json_annotation/json_annotation.dart';
part 'store_customer_home_model.g.dart';
@JsonSerializable()
class StoreCustomerHomeModel extends Object {
@JsonKey(name: 'ret')
int ret;
@JsonKey(name: 'data')
StoreCustomerHomeSunModel data;
@JsonKey(name: 'msg')
String msg;
StoreCustomerHomeModel(
this.ret,
this.data,
this.msg,
);
factory StoreCustomerHomeModel.fromJson(Map<String, dynamic> srcJson) =>
_$StoreCustomerHomeModelFromJson(srcJson);
Map<String, dynamic> toJson() => _$StoreCustomerHomeModelToJson(this);
}
@JsonSerializable()
class StoreCustomerHomeSunModel extends Object {
@JsonKey(name: 'myCustomer')
int myCustomer;
@JsonKey(name: 'active')
Active active;
@JsonKey(name: 'sleep')
Sleep sleep;
@JsonKey(name: 'drain')
Drain drain;
@JsonKey(name: 'seller_user')
List<SellerUser> sellerUser;
@JsonKey(name: 'distribution')
int distribution;
StoreCustomerHomeSunModel(
this.myCustomer,
this.active,
this.sleep,
this.drain,
this.sellerUser,
this.distribution,
);
factory StoreCustomerHomeSunModel.fromJson(Map<String, dynamic> srcJson) =>
_$StoreCustomerHomeSunModelFromJson(srcJson);
Map<String, dynamic> toJson() => _$StoreCustomerHomeSunModelToJson(this);
}
@JsonSerializable()
class Active extends Object {
@JsonKey(name: 'count')
int count;
@JsonKey(name: 'scale')
double scale;
Active(
this.count,
this.scale,
);
factory Active.fromJson(Map<String, dynamic> srcJson) =>
_$ActiveFromJson(srcJson);
Map<String, dynamic> toJson() => _$ActiveToJson(this);
}
@JsonSerializable()
class Sleep extends Object {
@JsonKey(name: 'count')
int count;
@JsonKey(name: 'scale')
double scale;
Sleep(
this.count,
this.scale,
);
factory Sleep.fromJson(Map<String, dynamic> srcJson) =>
_$SleepFromJson(srcJson);
Map<String, dynamic> toJson() => _$SleepToJson(this);
}
@JsonSerializable()
class Drain extends Object {
@JsonKey(name: 'count')
int count;
@JsonKey(name: 'scale')
double scale;
Drain(
this.count,
this.scale,
);
factory Drain.fromJson(Map<String, dynamic> srcJson) =>
_$DrainFromJson(srcJson);
Map<String, dynamic> toJson() => _$DrainToJson(this);
}
@JsonSerializable()
class SellerUser extends Object {
@JsonKey(name: 'count')
String count;
@JsonKey(name: 'nick_name')
String nickName;
@JsonKey(name: 'uid')
String uid;
@JsonKey(name: 'account')
String account;
@JsonKey(name: 'detailStr')
String detailStr;
SellerUser(this.count, this.nickName, this.uid, this.account, this.detailStr);
factory SellerUser.fromJson(Map<String, dynamic> srcJson) =>
_$SellerUserFromJson(srcJson);
Map<String, dynamic> toJson() => _$SellerUserToJson(this);
}