im_user.dart
1.55 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
class ImUser {
String avatar;
String address;
String nickname;
String token;
String phone;
String remarks;
int id;
int uid;
int platform;
int online;
int updateAt;
int lastActivity;
int createAt;
ImUser(
{this.avatar,
this.address,
this.nickname,
this.token,
this.phone,
this.remarks,
this.id,
this.uid,
this.platform,
this.online,
this.updateAt,
this.lastActivity,
this.createAt});
ImUser.fromJson(Map<String, dynamic> json) {
this.avatar = json['avatar'];
this.address = json['address'];
this.nickname = json['nickname'];
this.token = json['token'];
this.phone = json['phone'];
this.remarks = json['remarks'];
this.id = json['id'];
this.uid = json['uid'];
this.platform = json['platform'];
this.online = json['online'];
this.updateAt = json['update_at'];
this.lastActivity = json['last_activity'];
this.createAt = json['create_at'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['avatar'] = this.avatar;
data['address'] = this.address;
data['nickname'] = this.nickname;
data['token'] = this.token;
data['phone'] = this.phone;
data['remarks'] = this.remarks;
data['id'] = this.id;
data['uid'] = this.uid;
data['platform'] = this.platform;
data['online'] = this.online;
data['update_at'] = this.updateAt;
data['last_activity'] = this.lastActivity;
data['create_at'] = this.createAt;
return data;
}
}