123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- class UserInfo {
- String? userCode;
- String? userName;
- String? secretPassword;
- String? phone;
- String? email;
- String? nickName;
- String? fullName;
- String? headImageToken;
- String? organizationCode;
- List<String>? authorityGroups;
- List<String>? bindDevices;
- int score;
- String? lastIP;
- String? id;
- DateTime? createTime;
- DateTime? updateTime;
- bool isDelete;
- UserInfo({
- this.userCode,
- this.userName,
- this.secretPassword,
- this.phone,
- this.email,
- this.nickName,
- this.fullName,
- this.headImageToken,
- this.organizationCode,
- this.authorityGroups,
- this.bindDevices,
- this.score=0,
- this.lastIP,
- this.id,
- this.createTime,
- this.updateTime,
- this.isDelete=false,
- });
- factory UserInfo.fromJson(Map<String, dynamic> map) {
- return UserInfo(
- userCode: map['UserCode'],
- userName: map['UserName'],
- secretPassword: map['SecretPassword'],
- phone: map['Phone'],
- email: map['Email'],
- nickName: map['NickName'],
- fullName: map['FullName'],
- headImageToken: map['HeadImageToken'],
- organizationCode: map['OrganizationCode'],
- authorityGroups: map['AuthorityGroups'].cast<String>().toList(),
- bindDevices: map['BindDevices'].cast<String>().toList(),
- score: map['Score'],
- lastIP: map['LastIP'],
- id: map['Id'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- isDelete: map['IsDelete'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(userCode != null)
- map['UserCode'] = userCode;
- if(userName != null)
- map['UserName'] = userName;
- if(secretPassword != null)
- map['SecretPassword'] = secretPassword;
- if(phone != null)
- map['Phone'] = phone;
- if(email != null)
- map['Email'] = email;
- if(nickName != null)
- map['NickName'] = nickName;
- if(fullName != null)
- map['FullName'] = fullName;
- if(headImageToken != null)
- map['HeadImageToken'] = headImageToken;
- if(organizationCode != null)
- map['OrganizationCode'] = organizationCode;
- if(authorityGroups != null)
- map['AuthorityGroups'] = authorityGroups;
- if(bindDevices != null)
- map['BindDevices'] = bindDevices;
- map['Score'] = score;
- if(lastIP != null)
- map['LastIP'] = lastIP;
- if(id != null)
- map['Id'] = id;
- if(createTime != null)
- map['CreateTime'] = createTime;
- if(updateTime != null)
- map['UpdateTime'] = updateTime;
- map['IsDelete'] = isDelete;
- return map;
- }
- }
|