|
|
|
/// mid : "1379254113602109440"
|
|
|
|
/// nickname : "哈哈"
|
|
|
|
/// avatar : "https://pos.upload.lotus-wallet.com/admin/2022/11/d501d2cd-ffc0-49f2-967c-2e463462f500.jpeg"
|
|
|
|
/// phone : "13052919193"
|
|
|
|
/// isFollow : null
|
|
|
|
/// createTime : null
|
|
|
|
|
|
|
|
class ImUser {
|
|
|
|
ImUser({
|
|
|
|
String mid,
|
|
|
|
String nickname,
|
|
|
|
num isDelete,
|
|
|
|
num isTop,
|
|
|
|
String avatar,
|
|
|
|
String phone, }){
|
|
|
|
_mid = mid;
|
|
|
|
_nickname = nickname;
|
|
|
|
_isDelete = isDelete;
|
|
|
|
_isTop = isTop;
|
|
|
|
_avatar = avatar;
|
|
|
|
_phone = phone;
|
|
|
|
}
|
|
|
|
|
|
|
|
ImUser.fromJson(dynamic json) {
|
|
|
|
_mid = json['mid'];
|
|
|
|
_nickname = json['nickname'];
|
|
|
|
_isDelete = json['isDelete'];
|
|
|
|
_isTop = json['isTop'];
|
|
|
|
_avatar = json['avatar'];
|
|
|
|
_phone = json['phone'];
|
|
|
|
}
|
|
|
|
String _mid;
|
|
|
|
String _nickname;
|
|
|
|
num _isDelete;
|
|
|
|
num _isTop;
|
|
|
|
String _avatar;
|
|
|
|
String _phone;
|
|
|
|
ImUser copyWith({ String mid,
|
|
|
|
String nickname,
|
|
|
|
num isDelete,
|
|
|
|
num isTop,
|
|
|
|
String avatar,
|
|
|
|
String phone,
|
|
|
|
}) => ImUser( mid: mid ?? _mid,
|
|
|
|
nickname: nickname ?? _nickname,
|
|
|
|
isDelete: isDelete ?? _isDelete,
|
|
|
|
isTop: isTop ?? _isTop,
|
|
|
|
avatar: avatar ?? _avatar,
|
|
|
|
phone: phone ?? _phone,
|
|
|
|
);
|
|
|
|
String get mid => _mid;
|
|
|
|
String get nickname => _nickname;
|
|
|
|
num get isDelete => _isDelete;
|
|
|
|
num get isTop => _isTop;
|
|
|
|
String get avatar => _avatar;
|
|
|
|
String get phone => _phone;
|
|
|
|
|
|
|
|
set isTop(num value) {
|
|
|
|
_isTop = value;
|
|
|
|
}
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
final map = <String, dynamic>{};
|
|
|
|
map['mid'] = _mid;
|
|
|
|
map['nickname'] = _nickname;
|
|
|
|
map['isDelete'] = _isDelete;
|
|
|
|
map['isTop'] = _isTop;
|
|
|
|
map['avatar'] = _avatar;
|
|
|
|
map['phone'] = _phone;
|
|
|
|
return map;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|