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
/*
* @author lsy
* @date 2019-09-05
**/
class TestUserEntity {
Data data;
int errorCode;
String errorMsg;
TestUserEntity({this.data, this.errorCode, this.errorMsg});
TestUserEntity.fromJson(Map<String, dynamic> json) {
data = json['data'] != null ? new Data.fromJson(json['data']) : null;
errorCode = json['errorCode'];
errorMsg = json['errorMsg'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.data != null) {
data['data'] = this.data.toJson();
}
data['errorCode'] = this.errorCode;
data['errorMsg'] = this.errorMsg;
return data;
}
}
class Data {
bool admin;
List<String> chapterTops;
List<String> collectIds;
String email;
String icon;
int id;
String nickname;
String password;
String token;
int type;
String username;
Data(
{this.admin,
this.chapterTops,
this.collectIds,
this.email,
this.icon,
this.id,
this.nickname,
this.password,
this.token,
this.type,
this.username});
Data.fromJson(Map<String, dynamic> json) {
admin = json['admin'];
chapterTops = json['chapterTops'].cast<String>();
collectIds = json['collectIds'].cast<String>();
email = json['email'];
icon = json['icon'];
id = json['id'];
nickname = json['nickname'];
password = json['password'];
token = json['token'];
type = json['type'];
username = json['username'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['admin'] = this.admin;
data['chapterTops'] = this.chapterTops;
data['collectIds'] = this.collectIds;
data['email'] = this.email;
data['icon'] = this.icon;
data['id'] = this.id;
data['nickname'] = this.nickname;
data['password'] = this.password;
data['token'] = this.token;
data['type'] = this.type;
data['username'] = this.username;
return data;
}
}