aslan-flutter/lib/chatvibe_domain/models/res/at_game_ranking_res.dart
2026-07-01 18:25:58 +08:00

149 lines
3.2 KiB
Dart

/// records : [{"rank":0,"gameId":"","gameName":"","gameCover":"","gameOrigin":"","sysOrigin":"","totalPrizeAmount":0,"periodType":""}]
/// total : 0
/// size : 0
/// current : 0
class ATGameRankingRes {
ATGameRankingRes({
List<Records>? records,
num? total,
num? size,
num? current,
}) {
_records = records;
_total = total;
_size = size;
_current = current;
}
ATGameRankingRes.fromJson(dynamic json) {
if (json['records'] != null) {
_records = [];
json['records'].forEach((v) {
_records?.add(Records.fromJson(v));
});
}
_total = json['total'];
_size = json['size'];
_current = json['current'];
}
List<Records>? _records;
num? _total;
num? _size;
num? _current;
List<Records>? get records => _records;
num? get total => _total;
num? get size => _size;
num? get current => _current;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
if (_records != null) {
map['records'] = _records?.map((v) => v.toJson()).toList();
}
map['total'] = _total;
map['size'] = _size;
map['current'] = _current;
return map;
}
}
/// rank : 0
/// gameId : ""
/// gameName : ""
/// gameCover : ""
/// gameOrigin : ""
/// sysOrigin : ""
/// totalPrizeAmount : 0
/// periodType : ""
class Records {
Records({
num? rank,
String? gameId,
String? gameName,
String? gameUrl,
String? gameCover,
String? gameOrigin,
String? sysOrigin,
bool? latest,
num? totalPrizeAmount,
String? periodType,
}) {
_rank = rank;
_latest = latest;
_gameId = gameId;
_gameName = gameName;
_gameUrl = gameUrl;
_gameCover = gameCover;
_gameOrigin = gameOrigin;
_sysOrigin = sysOrigin;
_totalPrizeAmount = totalPrizeAmount;
_periodType = periodType;
}
Records.fromJson(dynamic json) {
_rank = json['rank'];
_latest = json['latest'];
_gameId = json['gameId'];
_gameName = json['gameName'];
_gameUrl = json['gameUrl'];
_gameCover = json['gameCover'];
_gameOrigin = json['gameOrigin'];
_sysOrigin = json['sysOrigin'];
_totalPrizeAmount = json['totalPrizeAmount'];
_periodType = json['periodType'];
}
num? _rank;
bool? _latest;
String? _gameId;
String? _gameName;
String? _gameUrl;
String? _gameCover;
String? _gameOrigin;
String? _sysOrigin;
num? _totalPrizeAmount;
String? _periodType;
num? get rank => _rank;
bool? get latest => _latest;
String? get gameId => _gameId;
String? get gameName => _gameName;
String? get gameUrl => _gameUrl;
String? get gameCover => _gameCover;
String? get gameOrigin => _gameOrigin;
String? get sysOrigin => _sysOrigin;
num? get totalPrizeAmount => _totalPrizeAmount;
String? get periodType => _periodType;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['rank'] = _rank;
map['latest'] = _latest;
map['gameId'] = _gameId;
map['gameName'] = _gameName;
map['gameUrl'] = _gameUrl;
map['gameCover'] = _gameCover;
map['gameOrigin'] = _gameOrigin;
map['sysOrigin'] = _sysOrigin;
map['totalPrizeAmount'] = _totalPrizeAmount;
map['periodType'] = _periodType;
return map;
}
}