208 lines
8.6 KiB
Dart
208 lines
8.6 KiB
Dart
import 'package:aslan/chatvibe_domain/models/res/login_res.dart';
|
|
|
|
/// id : "0"
|
|
/// sysOrigin : "string"
|
|
/// roomId : "0"
|
|
/// userId : "0"
|
|
/// gameStatus : "string"
|
|
/// gameStatusEvent : "string"
|
|
/// joinAmount : 0
|
|
/// bonus : 0
|
|
/// lockSeat : "string"
|
|
/// players : [{"consumeJoinAmount":0,"checkerboardColor":"string","initiator":true,"playerProfile":{"id":0,"account":"string","userAvatar":"string","userNickname":"string","userSex":0,"age":0,"accountStatus":"string","freezingTime":0,"isUpdateCountry":"string","countryId":0,"countryName":"string","countryCode":"string","autograph":"string","hobby":"string","cpList":[{"meUserId":0,"meAccount":"string","meUserAvatar":"string","meUserNickname":"string","cpUserId":0,"cpAccount":"string","cpUserAvatar":"string","cpUserNickname":"string","cpValId":0,"cpValue":0,"days":0,"firstDay":"string","createTime":0}],"isCpRelation":true,"familyId":0,"backgroundPhotos":[{"url":"string","status":0,"rejectReason":"string","createTime":0}],"personalPhotos":[{"url":"string","status":0,"rejectReason":"string","createTime":0}],"inRoomId":"string","roomIcon":"string","regionCode":"string","wealthLevel":0,"charmLevel":0,"originSys":"string","sysOriginChild":"string","del":true,"createTime":0,"bornYear":0,"bornMonth":0,"bornDay":0,"ownSpecialId":{"account":"string","expiredTime":0},"useProps":[{"userId":0,"propsResources":{"id":0,"type":"string","code":"string","name":"string","cover":"string","sourceUrl":"string","expand":"string","amount":0},"expireTime":0}],"sameRegion":true,"isFreightAgent":true,"isSuperFreightAgent":true,"firstRecharge":true,"firstRechargeAmount":0,"firstRechargeEndTime":0,"wearBadge":[{"id":0,"userId":0,"badgeLevel":0,"milestone":0,"badgeName":"string","type":"string","use":true,"badgeKey":"string","selectUrl":"string","notSelectUrl":"string","animationUrl":"string","expireTime":0}],"wearHonor":[{"id":0,"userId":0,"badgeLevel":0,"milestone":0,"badgeName":"string","type":"string","use":true,"badgeKey":"string","selectUrl":"string","notSelectUrl":"string","animationUrl":"string","expireTime":0}]}}]
|
|
/// createTime : 0
|
|
/// gameInfo : {"id":"0","gameId":"string","name":"string","gameCode":"string","cover":"string"}
|
|
|
|
class GameLudoRes {
|
|
GameLudoRes({
|
|
String? id,
|
|
String? sysOrigin,
|
|
String? roomId,
|
|
String? userId,
|
|
String? gameStatus,
|
|
String? gameStatusEvent,
|
|
num? joinAmount,
|
|
num? bonus,
|
|
String? lockSeat,
|
|
List<Players>? players,
|
|
num? createTime,
|
|
GameInfo? gameInfo,}){
|
|
_id = id;
|
|
_sysOrigin = sysOrigin;
|
|
_roomId = roomId;
|
|
_userId = userId;
|
|
_gameStatus = gameStatus;
|
|
_gameStatusEvent = gameStatusEvent;
|
|
_joinAmount = joinAmount;
|
|
_bonus = bonus;
|
|
_lockSeat = lockSeat;
|
|
_players = players;
|
|
_createTime = createTime;
|
|
_gameInfo = gameInfo;
|
|
}
|
|
|
|
GameLudoRes.fromJson(dynamic json) {
|
|
_id = json['id'];
|
|
_sysOrigin = json['sysOrigin'];
|
|
_roomId = json['roomId'];
|
|
_userId = json['userId'];
|
|
_gameStatus = json['gameStatus'];
|
|
_gameStatusEvent = json['gameStatusEvent'];
|
|
_joinAmount = json['joinAmount'];
|
|
_bonus = json['bonus'];
|
|
_lockSeat = json['lockSeat'];
|
|
if (json['players'] != null) {
|
|
_players = [];
|
|
json['players'].forEach((v) {
|
|
_players?.add(Players.fromJson(v));
|
|
});
|
|
}
|
|
_createTime = json['createTime'];
|
|
_gameInfo = json['gameInfo'] != null ? GameInfo.fromJson(json['gameInfo']) : null;
|
|
}
|
|
String? _id;
|
|
String? _sysOrigin;
|
|
String? _roomId;
|
|
String? _userId;
|
|
String? _gameStatus;
|
|
String? _gameStatusEvent;
|
|
num? _joinAmount;
|
|
num? _bonus;
|
|
String? _lockSeat;
|
|
List<Players>? _players;
|
|
num? _createTime;
|
|
GameInfo? _gameInfo;
|
|
|
|
String? get id => _id;
|
|
String? get sysOrigin => _sysOrigin;
|
|
String? get roomId => _roomId;
|
|
String? get userId => _userId;
|
|
String? get gameStatus => _gameStatus;
|
|
String? get gameStatusEvent => _gameStatusEvent;
|
|
num? get joinAmount => _joinAmount;
|
|
num? get bonus => _bonus;
|
|
String? get lockSeat => _lockSeat;
|
|
List<Players>? get players => _players;
|
|
num? get createTime => _createTime;
|
|
GameInfo? get gameInfo => _gameInfo;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['id'] = _id;
|
|
map['sysOrigin'] = _sysOrigin;
|
|
map['roomId'] = _roomId;
|
|
map['userId'] = _userId;
|
|
map['gameStatus'] = _gameStatus;
|
|
map['gameStatusEvent'] = _gameStatusEvent;
|
|
map['joinAmount'] = _joinAmount;
|
|
map['bonus'] = _bonus;
|
|
map['lockSeat'] = _lockSeat;
|
|
if (_players != null) {
|
|
map['players'] = _players?.map((v) => v.toJson()).toList();
|
|
}
|
|
map['createTime'] = _createTime;
|
|
if (_gameInfo != null) {
|
|
map['gameInfo'] = _gameInfo?.toJson();
|
|
}
|
|
return map;
|
|
}
|
|
|
|
}
|
|
|
|
/// id : "0"
|
|
/// gameId : "string"
|
|
/// name : "string"
|
|
/// gameCode : "string"
|
|
/// cover : "string"
|
|
|
|
class GameInfo {
|
|
GameInfo({
|
|
String? id,
|
|
String? gameId,
|
|
String? name,
|
|
String? gameCode,
|
|
String? cover,}){
|
|
_id = id;
|
|
_gameId = gameId;
|
|
_name = name;
|
|
_gameCode = gameCode;
|
|
_cover = cover;
|
|
}
|
|
|
|
GameInfo.fromJson(dynamic json) {
|
|
_id = json['id'];
|
|
_gameId = json['gameId'];
|
|
_name = json['name'];
|
|
_gameCode = json['gameCode'];
|
|
_cover = json['cover'];
|
|
}
|
|
String? _id;
|
|
String? _gameId;
|
|
String? _name;
|
|
String? _gameCode;
|
|
String? _cover;
|
|
|
|
String? get id => _id;
|
|
String? get gameId => _gameId;
|
|
String? get name => _name;
|
|
String? get gameCode => _gameCode;
|
|
String? get cover => _cover;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['id'] = _id;
|
|
map['gameId'] = _gameId;
|
|
map['name'] = _name;
|
|
map['gameCode'] = _gameCode;
|
|
map['cover'] = _cover;
|
|
return map;
|
|
}
|
|
|
|
}
|
|
|
|
/// consumeJoinAmount : 0
|
|
/// checkerboardColor : "string"
|
|
/// initiator : true
|
|
/// playerProfile : {"id":0,"account":"string","userAvatar":"string","userNickname":"string","userSex":0,"age":0,"accountStatus":"string","freezingTime":0,"isUpdateCountry":"string","countryId":0,"countryName":"string","countryCode":"string","autograph":"string","hobby":"string","cpList":[{"meUserId":0,"meAccount":"string","meUserAvatar":"string","meUserNickname":"string","cpUserId":0,"cpAccount":"string","cpUserAvatar":"string","cpUserNickname":"string","cpValId":0,"cpValue":0,"days":0,"firstDay":"string","createTime":0}],"isCpRelation":true,"familyId":0,"backgroundPhotos":[{"url":"string","status":0,"rejectReason":"string","createTime":0}],"personalPhotos":[{"url":"string","status":0,"rejectReason":"string","createTime":0}],"inRoomId":"string","roomIcon":"string","regionCode":"string","wealthLevel":0,"charmLevel":0,"originSys":"string","sysOriginChild":"string","del":true,"createTime":0,"bornYear":0,"bornMonth":0,"bornDay":0,"ownSpecialId":{"account":"string","expiredTime":0},"useProps":[{"userId":0,"propsResources":{"id":0,"type":"string","code":"string","name":"string","cover":"string","sourceUrl":"string","expand":"string","amount":0},"expireTime":0}],"sameRegion":true,"isFreightAgent":true,"isSuperFreightAgent":true,"firstRecharge":true,"firstRechargeAmount":0,"firstRechargeEndTime":0,"wearBadge":[{"id":0,"userId":0,"badgeLevel":0,"milestone":0,"badgeName":"string","type":"string","use":true,"badgeKey":"string","selectUrl":"string","notSelectUrl":"string","animationUrl":"string","expireTime":0}],"wearHonor":[{"id":0,"userId":0,"badgeLevel":0,"milestone":0,"badgeName":"string","type":"string","use":true,"badgeKey":"string","selectUrl":"string","notSelectUrl":"string","animationUrl":"string","expireTime":0}]}
|
|
|
|
class Players {
|
|
Players({
|
|
num? consumeJoinAmount,
|
|
String? checkerboardColor,
|
|
bool? initiator,
|
|
ChatVibeUserProfile? playerProfile,}){
|
|
_consumeJoinAmount = consumeJoinAmount;
|
|
_checkerboardColor = checkerboardColor;
|
|
_initiator = initiator;
|
|
_playerProfile = playerProfile;
|
|
}
|
|
|
|
Players.fromJson(dynamic json) {
|
|
_consumeJoinAmount = json['consumeJoinAmount'];
|
|
_checkerboardColor = json['checkerboardColor'];
|
|
_initiator = json['initiator'];
|
|
_playerProfile = json['playerProfile'] != null ? ChatVibeUserProfile.fromJson(json['playerProfile']) : null;
|
|
}
|
|
num? _consumeJoinAmount;
|
|
String? _checkerboardColor;
|
|
bool? _initiator;
|
|
ChatVibeUserProfile? _playerProfile;
|
|
|
|
num? get consumeJoinAmount => _consumeJoinAmount;
|
|
String? get checkerboardColor => _checkerboardColor;
|
|
bool? get initiator => _initiator;
|
|
ChatVibeUserProfile? get playerProfile => _playerProfile;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['consumeJoinAmount'] = _consumeJoinAmount;
|
|
map['checkerboardColor'] = _checkerboardColor;
|
|
map['initiator'] = _initiator;
|
|
if (_playerProfile != null) {
|
|
map['playerProfile'] = _playerProfile?.toJson();
|
|
}
|
|
return map;
|
|
}
|
|
|
|
}
|