|
|
|
@ -6,6 +6,7 @@ class UserBaseData { |
|
|
|
final String phone; |
|
|
|
final String realName; |
|
|
|
final String userId; |
|
|
|
final int matchmakerType; |
|
|
|
|
|
|
|
UserBaseData({ |
|
|
|
required this.matchmakerFlag, |
|
|
|
@ -14,12 +15,14 @@ class UserBaseData { |
|
|
|
required this.phone, |
|
|
|
required this.realName, |
|
|
|
required this.userId, |
|
|
|
required this.matchmakerType, |
|
|
|
}); |
|
|
|
|
|
|
|
// 从JSON映射创建实例 |
|
|
|
factory UserBaseData.fromJson(Map<String, dynamic> json) { |
|
|
|
return UserBaseData( |
|
|
|
matchmakerFlag: json['matchmakerFlag'] ?? false, |
|
|
|
matchmakerType: json['matchmakerType'] ?? 0, |
|
|
|
matchmakingCornerFlag: json['matchmakingCornerFlag'] ?? false, |
|
|
|
nickName: json['nickName'] ?? '', |
|
|
|
phone: json['phone'] ?? '', |
|
|
|
@ -32,6 +35,7 @@ class UserBaseData { |
|
|
|
Map<String, dynamic> toJson() { |
|
|
|
return { |
|
|
|
'matchmakerFlag': matchmakerFlag, |
|
|
|
'matchmakerType': matchmakerType, |
|
|
|
'matchmakingCornerFlag': matchmakingCornerFlag, |
|
|
|
'nickName': nickName, |
|
|
|
'phone': phone, |
|
|
|
|