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
/*
* @author lsy
* @date 2019-10-16
**/
class UploadTokenBean {
int error;
String message;
Null extra;
Data data;
UserType userType;
UploadTokenBean(
{this.error, this.message, this.extra, this.data, this.userType});
UploadTokenBean.fromJson(Map<String, dynamic> json) {
error = json['error'];
message = json['message'];
extra = json['extra'];
data = json['data'] != null ? new Data.fromJson(json['data']) : null;
userType = json['user_type'] != null
? new UserType.fromJson(json['user_type'])
: null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['error'] = this.error;
data['message'] = this.message;
data['extra'] = this.extra;
if (this.data != null) {
data['data'] = this.data.toJson();
}
if (this.userType != null) {
data['user_type'] = this.userType.toJson();
}
return data;
}
}
class Data {
String token;
int tokenType;
Data({this.token, this.tokenType});
Data.fromJson(Map<String, dynamic> json) {
token = json['token'];
tokenType = json['token_type'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['token'] = this.token;
data['token_type'] = this.tokenType;
return data;
}
}
class UserType {
UserType();
UserType.fromJson(Map<String, dynamic> json) {}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
return data;
}
}