515 lines
15 KiB
Dart
515 lines
15 KiB
Dart
import 'package:yumi/shared/business_logic/models/res/room_res.dart';
|
|
|
|
import 'package:yumi/shared/business_logic/models/res/login_res.dart';
|
|
|
|
/// id : "0"
|
|
/// roomProfile : {"countryCode":"","countryName":"","event":"","hotRoom":false,"id":"0","layoutKey":"","nationalFlag":"","roomAccount":"","roomBadgeIcons":[""],"roomCover":"","roomDesc":"","roomGameIcon":"","roomName":"","sysOrigin":"","userId":"0","userProfile":{"account":"","accountStatus":"","age":0,"bornDay":0,"bornMonth":0,"bornYear":0,"countryCode":"","countryId":0,"countryName":"","createTime":0,"del":false,"freezingTime":0,"id":"s","originSys":"","ownSpecialId":{"account":"","expiredTime":0},"sameRegion":false,"sysOriginChild":"","useProps":[{"expireTime":0,"propsResources":{"amount":0.0,"code":"","cover":"","expand":"","id":0,"name":"","sourceUrl":"","type":""},"userId":0}],"userAvatar":"","userNickname":"","userSex":0,"wearBadge":[{"animationUrl":"","badgeKey":"","badgeLevel":0,"badgeName":"","expireTime":0,"id":0,"milestone":0,"notSelectUrl":"","selectUrl":"","type":"","userId":0}]},"userSVipLevel":""}
|
|
|
|
class FollowRoomRes {
|
|
FollowRoomRes({
|
|
String? id,
|
|
RoomProfile? roomProfile,}){
|
|
_id = id;
|
|
_roomProfile = roomProfile;
|
|
}
|
|
|
|
FollowRoomRes.fromJson(dynamic json) {
|
|
_id = json['id'];
|
|
_roomProfile = json['roomProfile'] != null ? RoomProfile.fromJson(json['roomProfile']) : null;
|
|
}
|
|
String? _id;
|
|
RoomProfile? _roomProfile;
|
|
FollowRoomRes copyWith({ String? id,
|
|
RoomProfile? roomProfile,
|
|
}) => FollowRoomRes( id: id ?? _id,
|
|
roomProfile: roomProfile ?? _roomProfile,
|
|
);
|
|
String? get id => _id;
|
|
RoomProfile? get roomProfile => _roomProfile;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['id'] = _id;
|
|
if (_roomProfile != null) {
|
|
map['roomProfile'] = _roomProfile?.toJson();
|
|
}
|
|
return map;
|
|
}
|
|
|
|
}
|
|
|
|
/// countryCode : ""
|
|
/// countryName : ""
|
|
/// event : ""
|
|
/// hotRoom : false
|
|
/// id : "0"
|
|
/// layoutKey : ""
|
|
/// nationalFlag : ""
|
|
/// roomAccount : ""
|
|
/// roomBadgeIcons : [""]
|
|
/// roomCover : ""
|
|
/// roomDesc : ""
|
|
/// roomGameIcon : ""
|
|
/// roomName : ""
|
|
/// sysOrigin : ""
|
|
/// userId : "0"
|
|
/// userProfile : {"account":"","accountStatus":"","age":0,"bornDay":0,"bornMonth":0,"bornYear":0,"countryCode":"","countryId":0,"countryName":"","createTime":0,"del":false,"freezingTime":0,"id":"s","originSys":"","ownSpecialId":{"account":"","expiredTime":0},"sameRegion":false,"sysOriginChild":"","useProps":[{"expireTime":0,"propsResources":{"amount":0.0,"code":"","cover":"","expand":"","id":0,"name":"","sourceUrl":"","type":""},"userId":0}],"userAvatar":"","userNickname":"","userSex":0,"wearBadge":[{"animationUrl":"","badgeKey":"","badgeLevel":0,"badgeName":"","expireTime":0,"id":0,"milestone":0,"notSelectUrl":"","selectUrl":"","type":"","userId":0}]}
|
|
/// userSVipLevel : ""
|
|
|
|
class RoomProfile {
|
|
RoomProfile({
|
|
String? countryCode,
|
|
String? countryName,
|
|
String? event,
|
|
bool? hotRoom,
|
|
String? id,
|
|
String? layoutKey,
|
|
String? nationalFlag,
|
|
String? roomAccount,
|
|
List<String>? roomBadgeIcons,
|
|
String? roomCover,
|
|
String? roomDesc,
|
|
String? roomGameIcon,
|
|
String? roomName,
|
|
String? sysOrigin,
|
|
String? userId,
|
|
SocialChatUserProfile? userProfile,
|
|
String? userSVipLevel,ExtValues? extValues,}){
|
|
_countryCode = countryCode;
|
|
_countryName = countryName;
|
|
_event = event;
|
|
_hotRoom = hotRoom;
|
|
_id = id;
|
|
_layoutKey = layoutKey;
|
|
_nationalFlag = nationalFlag;
|
|
_roomAccount = roomAccount;
|
|
_roomBadgeIcons = roomBadgeIcons;
|
|
_roomCover = roomCover;
|
|
_roomDesc = roomDesc;
|
|
_roomGameIcon = roomGameIcon;
|
|
_roomName = roomName;
|
|
_sysOrigin = sysOrigin;
|
|
_userId = userId;
|
|
_userProfile = userProfile;
|
|
_userSVipLevel = userSVipLevel;
|
|
_extValues = extValues;
|
|
}
|
|
|
|
RoomProfile.fromJson(dynamic json) {
|
|
_countryCode = json['countryCode'];
|
|
_countryName = json['countryName'];
|
|
_event = json['event'];
|
|
_hotRoom = json['hotRoom'];
|
|
_id = json['id'];
|
|
_layoutKey = json['layoutKey'];
|
|
_nationalFlag = json['nationalFlag'];
|
|
_roomAccount = json['roomAccount'];
|
|
_roomBadgeIcons = json['roomBadgeIcons'] != null ? json['roomBadgeIcons'].cast<String>() : [];
|
|
_roomCover = json['roomCover'];
|
|
_roomDesc = json['roomDesc'];
|
|
_roomGameIcon = json['roomGameIcon'];
|
|
_roomName = json['roomName'];
|
|
_sysOrigin = json['sysOrigin'];
|
|
_userId = json['userId'];
|
|
_userProfile = json['userProfile'] != null ? SocialChatUserProfile.fromJson(json['userProfile']) : null;
|
|
_userSVipLevel = json['userSVipLevel'];
|
|
_extValues =
|
|
json['extValues'] != null
|
|
? ExtValues.fromJson(json['extValues'])
|
|
: null;
|
|
}
|
|
String? _countryCode;
|
|
String? _countryName;
|
|
String? _event;
|
|
bool? _hotRoom;
|
|
String? _id;
|
|
String? _layoutKey;
|
|
String? _nationalFlag;
|
|
String? _roomAccount;
|
|
List<String>? _roomBadgeIcons;
|
|
String? _roomCover;
|
|
String? _roomDesc;
|
|
String? _roomGameIcon;
|
|
String? _roomName;
|
|
String? _sysOrigin;
|
|
String? _userId;
|
|
SocialChatUserProfile? _userProfile;
|
|
String? _userSVipLevel;
|
|
ExtValues? _extValues;
|
|
RoomProfile copyWith({ String? countryCode,
|
|
String? countryName,
|
|
String? event,
|
|
bool? hotRoom,
|
|
String? id,
|
|
String? layoutKey,
|
|
String? nationalFlag,
|
|
String? roomAccount,
|
|
List<String>? roomBadgeIcons,
|
|
String? roomCover,
|
|
String? roomDesc,
|
|
String? roomGameIcon,
|
|
String? roomName,
|
|
String? sysOrigin,
|
|
String? userId,
|
|
SocialChatUserProfile? userProfile,
|
|
String? userSVipLevel,
|
|
ExtValues? extValues,
|
|
}) => RoomProfile( countryCode: countryCode ?? _countryCode,
|
|
countryName: countryName ?? _countryName,
|
|
event: event ?? _event,
|
|
hotRoom: hotRoom ?? _hotRoom,
|
|
id: id ?? _id,
|
|
layoutKey: layoutKey ?? _layoutKey,
|
|
nationalFlag: nationalFlag ?? _nationalFlag,
|
|
roomAccount: roomAccount ?? _roomAccount,
|
|
roomBadgeIcons: roomBadgeIcons ?? _roomBadgeIcons,
|
|
roomCover: roomCover ?? _roomCover,
|
|
roomDesc: roomDesc ?? _roomDesc,
|
|
roomGameIcon: roomGameIcon ?? _roomGameIcon,
|
|
roomName: roomName ?? _roomName,
|
|
sysOrigin: sysOrigin ?? _sysOrigin,
|
|
userId: userId ?? _userId,
|
|
userProfile: userProfile ?? _userProfile,
|
|
userSVipLevel: userSVipLevel ?? _userSVipLevel,
|
|
extValues: extValues ?? _extValues,
|
|
);
|
|
String? get countryCode => _countryCode;
|
|
String? get countryName => _countryName;
|
|
String? get event => _event;
|
|
bool? get hotRoom => _hotRoom;
|
|
String? get id => _id;
|
|
String? get layoutKey => _layoutKey;
|
|
String? get nationalFlag => _nationalFlag;
|
|
String? get roomAccount => _roomAccount;
|
|
List<String>? get roomBadgeIcons => _roomBadgeIcons;
|
|
String? get roomCover => _roomCover;
|
|
String? get roomDesc => _roomDesc;
|
|
String? get roomGameIcon => _roomGameIcon;
|
|
String? get roomName => _roomName;
|
|
String? get sysOrigin => _sysOrigin;
|
|
String? get userId => _userId;
|
|
SocialChatUserProfile? get userProfile => _userProfile;
|
|
String? get userSVipLevel => _userSVipLevel;
|
|
ExtValues? get extValues => _extValues;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['countryCode'] = _countryCode;
|
|
map['countryName'] = _countryName;
|
|
map['event'] = _event;
|
|
map['hotRoom'] = _hotRoom;
|
|
map['id'] = _id;
|
|
map['layoutKey'] = _layoutKey;
|
|
map['nationalFlag'] = _nationalFlag;
|
|
map['roomAccount'] = _roomAccount;
|
|
map['roomBadgeIcons'] = _roomBadgeIcons;
|
|
map['roomCover'] = _roomCover;
|
|
map['roomDesc'] = _roomDesc;
|
|
map['roomGameIcon'] = _roomGameIcon;
|
|
map['roomName'] = _roomName;
|
|
map['sysOrigin'] = _sysOrigin;
|
|
map['userId'] = _userId;
|
|
if (_userProfile != null) {
|
|
map['userProfile'] = _userProfile?.toJson();
|
|
}
|
|
map['userSVipLevel'] = _userSVipLevel;
|
|
if (_extValues != null) {
|
|
map['extValues'] = _extValues?.toJson();
|
|
}
|
|
return map;
|
|
}
|
|
|
|
}
|
|
|
|
/// account : ""
|
|
/// accountStatus : ""
|
|
/// age : 0
|
|
/// bornDay : 0
|
|
/// bornMonth : 0
|
|
/// bornYear : 0
|
|
/// countryCode : ""
|
|
/// countryId : 0
|
|
/// countryName : ""
|
|
/// createTime : 0
|
|
/// del : false
|
|
/// freezingTime : 0
|
|
/// id : "s"
|
|
/// originSys : ""
|
|
/// ownSpecialId : {"account":"","expiredTime":0}
|
|
/// sameRegion : false
|
|
/// sysOriginChild : ""
|
|
/// useProps : [{"expireTime":0,"propsResources":{"amount":0.0,"code":"","cover":"","expand":"","id":0,"name":"","sourceUrl":"","type":""},"userId":0}]
|
|
/// userAvatar : ""
|
|
/// userNickname : ""
|
|
/// userSex : 0
|
|
/// wearBadge : [{"animationUrl":"","badgeKey":"","badgeLevel":0,"badgeName":"","expireTime":0,"id":0,"milestone":0,"notSelectUrl":"","selectUrl":"","type":"","userId":0}]
|
|
|
|
class WearBadge {
|
|
WearBadge({
|
|
String? animationUrl,
|
|
String? badgeKey,
|
|
num? badgeLevel,
|
|
String? badgeName,
|
|
num? expireTime,
|
|
num? id,
|
|
num? milestone,
|
|
String? notSelectUrl,
|
|
String? selectUrl,
|
|
String? type,
|
|
num? userId,}){
|
|
_animationUrl = animationUrl;
|
|
_badgeKey = badgeKey;
|
|
_badgeLevel = badgeLevel;
|
|
_badgeName = badgeName;
|
|
_expireTime = expireTime;
|
|
_id = id;
|
|
_milestone = milestone;
|
|
_notSelectUrl = notSelectUrl;
|
|
_selectUrl = selectUrl;
|
|
_type = type;
|
|
_userId = userId;
|
|
}
|
|
|
|
WearBadge.fromJson(dynamic json) {
|
|
_animationUrl = json['animationUrl'];
|
|
_badgeKey = json['badgeKey'];
|
|
_badgeLevel = json['badgeLevel'];
|
|
_badgeName = json['badgeName'];
|
|
_expireTime = json['expireTime'];
|
|
_id = json['id'];
|
|
_milestone = json['milestone'];
|
|
_notSelectUrl = json['notSelectUrl'];
|
|
_selectUrl = json['selectUrl'];
|
|
_type = json['type'];
|
|
_userId = json['userId'];
|
|
}
|
|
String? _animationUrl;
|
|
String? _badgeKey;
|
|
num? _badgeLevel;
|
|
String? _badgeName;
|
|
num? _expireTime;
|
|
num? _id;
|
|
num? _milestone;
|
|
String? _notSelectUrl;
|
|
String? _selectUrl;
|
|
String? _type;
|
|
num? _userId;
|
|
WearBadge copyWith({ String? animationUrl,
|
|
String? badgeKey,
|
|
num? badgeLevel,
|
|
String? badgeName,
|
|
num? expireTime,
|
|
num? id,
|
|
num? milestone,
|
|
String? notSelectUrl,
|
|
String? selectUrl,
|
|
String? type,
|
|
num? userId,
|
|
}) => WearBadge( animationUrl: animationUrl ?? _animationUrl,
|
|
badgeKey: badgeKey ?? _badgeKey,
|
|
badgeLevel: badgeLevel ?? _badgeLevel,
|
|
badgeName: badgeName ?? _badgeName,
|
|
expireTime: expireTime ?? _expireTime,
|
|
id: id ?? _id,
|
|
milestone: milestone ?? _milestone,
|
|
notSelectUrl: notSelectUrl ?? _notSelectUrl,
|
|
selectUrl: selectUrl ?? _selectUrl,
|
|
type: type ?? _type,
|
|
userId: userId ?? _userId,
|
|
);
|
|
String? get animationUrl => _animationUrl;
|
|
String? get badgeKey => _badgeKey;
|
|
num? get badgeLevel => _badgeLevel;
|
|
String? get badgeName => _badgeName;
|
|
num? get expireTime => _expireTime;
|
|
num? get id => _id;
|
|
num? get milestone => _milestone;
|
|
String? get notSelectUrl => _notSelectUrl;
|
|
String? get selectUrl => _selectUrl;
|
|
String? get type => _type;
|
|
num? get userId => _userId;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['animationUrl'] = _animationUrl;
|
|
map['badgeKey'] = _badgeKey;
|
|
map['badgeLevel'] = _badgeLevel;
|
|
map['badgeName'] = _badgeName;
|
|
map['expireTime'] = _expireTime;
|
|
map['id'] = _id;
|
|
map['milestone'] = _milestone;
|
|
map['notSelectUrl'] = _notSelectUrl;
|
|
map['selectUrl'] = _selectUrl;
|
|
map['type'] = _type;
|
|
map['userId'] = _userId;
|
|
return map;
|
|
}
|
|
|
|
}
|
|
|
|
/// expireTime : 0
|
|
/// propsResources : {"amount":0.0,"code":"","cover":"","expand":"","id":0,"name":"","sourceUrl":"","type":""}
|
|
/// userId : 0
|
|
|
|
class UseProps {
|
|
UseProps({
|
|
num? expireTime,
|
|
PropsResources? propsResources,
|
|
num? userId,}){
|
|
_expireTime = expireTime;
|
|
_propsResources = propsResources;
|
|
_userId = userId;
|
|
}
|
|
|
|
UseProps.fromJson(dynamic json) {
|
|
_expireTime = json['expireTime'];
|
|
_propsResources = json['propsResources'] != null ? PropsResources.fromJson(json['propsResources']) : null;
|
|
_userId = json['userId'];
|
|
}
|
|
num? _expireTime;
|
|
PropsResources? _propsResources;
|
|
num? _userId;
|
|
UseProps copyWith({ num? expireTime,
|
|
PropsResources? propsResources,
|
|
num? userId,
|
|
}) => UseProps( expireTime: expireTime ?? _expireTime,
|
|
propsResources: propsResources ?? _propsResources,
|
|
userId: userId ?? _userId,
|
|
);
|
|
num? get expireTime => _expireTime;
|
|
PropsResources? get propsResources => _propsResources;
|
|
num? get userId => _userId;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['expireTime'] = _expireTime;
|
|
if (_propsResources != null) {
|
|
map['propsResources'] = _propsResources?.toJson();
|
|
}
|
|
map['userId'] = _userId;
|
|
return map;
|
|
}
|
|
|
|
}
|
|
|
|
/// amount : 0.0
|
|
/// code : ""
|
|
/// cover : ""
|
|
/// expand : ""
|
|
/// id : 0
|
|
/// name : ""
|
|
/// sourceUrl : ""
|
|
/// type : ""
|
|
|
|
class PropsResources {
|
|
PropsResources({
|
|
num? amount,
|
|
String? code,
|
|
String? cover,
|
|
String? expand,
|
|
num? id,
|
|
String? name,
|
|
String? sourceUrl,
|
|
String? type,}){
|
|
_amount = amount;
|
|
_code = code;
|
|
_cover = cover;
|
|
_expand = expand;
|
|
_id = id;
|
|
_name = name;
|
|
_sourceUrl = sourceUrl;
|
|
_type = type;
|
|
}
|
|
|
|
PropsResources.fromJson(dynamic json) {
|
|
_amount = json['amount'];
|
|
_code = json['code'];
|
|
_cover = json['cover'];
|
|
_expand = json['expand'];
|
|
_id = json['id'];
|
|
_name = json['name'];
|
|
_sourceUrl = json['sourceUrl'];
|
|
_type = json['type'];
|
|
}
|
|
num? _amount;
|
|
String? _code;
|
|
String? _cover;
|
|
String? _expand;
|
|
num? _id;
|
|
String? _name;
|
|
String? _sourceUrl;
|
|
String? _type;
|
|
PropsResources copyWith({ num? amount,
|
|
String? code,
|
|
String? cover,
|
|
String? expand,
|
|
num? id,
|
|
String? name,
|
|
String? sourceUrl,
|
|
String? type,
|
|
}) => PropsResources( amount: amount ?? _amount,
|
|
code: code ?? _code,
|
|
cover: cover ?? _cover,
|
|
expand: expand ?? _expand,
|
|
id: id ?? _id,
|
|
name: name ?? _name,
|
|
sourceUrl: sourceUrl ?? _sourceUrl,
|
|
type: type ?? _type,
|
|
);
|
|
num? get amount => _amount;
|
|
String? get code => _code;
|
|
String? get cover => _cover;
|
|
String? get expand => _expand;
|
|
num? get id => _id;
|
|
String? get name => _name;
|
|
String? get sourceUrl => _sourceUrl;
|
|
String? get type => _type;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['amount'] = _amount;
|
|
map['code'] = _code;
|
|
map['cover'] = _cover;
|
|
map['expand'] = _expand;
|
|
map['id'] = _id;
|
|
map['name'] = _name;
|
|
map['sourceUrl'] = _sourceUrl;
|
|
map['type'] = _type;
|
|
return map;
|
|
}
|
|
|
|
}
|
|
|
|
/// account : ""
|
|
/// expiredTime : 0
|
|
|
|
class OwnSpecialId {
|
|
OwnSpecialId({
|
|
String? account,
|
|
num? expiredTime,}){
|
|
_account = account;
|
|
_expiredTime = expiredTime;
|
|
}
|
|
|
|
OwnSpecialId.fromJson(dynamic json) {
|
|
_account = json['account'];
|
|
_expiredTime = json['expiredTime'];
|
|
}
|
|
String? _account;
|
|
num? _expiredTime;
|
|
OwnSpecialId copyWith({ String? account,
|
|
num? expiredTime,
|
|
}) => OwnSpecialId( account: account ?? _account,
|
|
expiredTime: expiredTime ?? _expiredTime,
|
|
);
|
|
String? get account => _account;
|
|
num? get expiredTime => _expiredTime;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['account'] = _account;
|
|
map['expiredTime'] = _expiredTime;
|
|
return map;
|
|
}
|
|
|
|
} |