|
@@ -0,0 +1,43 @@
|
|
|
+class UserInfo {
|
|
|
+ UserInfo({
|
|
|
+ required this.userCode,
|
|
|
+ required this.userName,
|
|
|
+ this.phone,
|
|
|
+ this.email,
|
|
|
+ this.nickName,
|
|
|
+ this.fullName,
|
|
|
+ this.headImageToken,
|
|
|
+ this.organizationCode,
|
|
|
+ this.authorityGroups = const [],
|
|
|
+ this.bindDevices = const [],
|
|
|
+ this.score = 0,
|
|
|
+ });
|
|
|
+
|
|
|
+ final String userCode;
|
|
|
+ final String userName;
|
|
|
+ final String? phone;
|
|
|
+ final String? email;
|
|
|
+ final String? nickName;
|
|
|
+ final String? fullName;
|
|
|
+ final String? headImageToken;
|
|
|
+ final String? organizationCode;
|
|
|
+ final List<String> authorityGroups;
|
|
|
+ final List<String> bindDevices;
|
|
|
+ final double score;
|
|
|
+
|
|
|
+ factory UserInfo.fromJson(Map<String, dynamic> map) {
|
|
|
+ return UserInfo(
|
|
|
+ userCode: map['UserCode'],
|
|
|
+ userName: map['UserName'],
|
|
|
+ phone: map['Phone'],
|
|
|
+ email: map['Email'],
|
|
|
+ nickName: map['NickName'],
|
|
|
+ fullName: map['FullName'],
|
|
|
+ headImageToken: map['HeadImageToken'],
|
|
|
+ organizationCode: map['OrganizationCode'],
|
|
|
+ score: map['Score'],
|
|
|
+ authorityGroups: (map['AuthorityGroups'] as List).cast<String>(),
|
|
|
+ bindDevices: (map['BindDevices'] as List).cast<String>(),
|
|
|
+ );
|
|
|
+ }
|
|
|
+}
|