rank_info.dart 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. import 'package:sport/bean/game.dart';
  2. class RankInfoData {
  3. int? id;
  4. String? name;
  5. int? isGame;
  6. int? isSport;
  7. int? gameId;
  8. String? introduce;
  9. int? userCountMax;
  10. String? rateBegin;
  11. String? rateEnd;
  12. GameInfoData? game;
  13. RankInfoData(
  14. {this.id,
  15. this.name,
  16. this.isGame,
  17. this.isSport,
  18. this.gameId,
  19. this.introduce,
  20. this.userCountMax,
  21. this.rateBegin,
  22. this.rateEnd,
  23. this.game});
  24. RankInfoData.fromJson(Map<String, dynamic> json) {
  25. id = json['id'];
  26. name = json['name'];
  27. isGame = json['is_game'];
  28. isSport = json['is_sport'];
  29. gameId = json['game_id'];
  30. introduce = json['introduce'];
  31. userCountMax = json['user_count_max'];
  32. rateBegin = json['rate_begin'];
  33. rateEnd = json['rate_end'];
  34. game =
  35. json['game'] != null ? new GameInfoData.fromJson(json['game']) : null;
  36. }
  37. Map<String, dynamic> toJson() {
  38. final Map<String, dynamic> data = new Map<String, dynamic>();
  39. data['id'] = this.id;
  40. data['name'] = this.name;
  41. data['is_game'] = this.isGame;
  42. data['is_sport'] = this.isSport;
  43. data['game_id'] = this.gameId;
  44. data['introduce'] = this.introduce;
  45. data['user_count_max'] = this.userCountMax;
  46. data['rate_begin'] = this.rateBegin;
  47. data['rate_end'] = this.rateEnd;
  48. if (this.game != null) {
  49. data['game'] = this.game!.toJson();
  50. }
  51. return data;
  52. }
  53. }
  54. class GameCover {
  55. String? cover;
  56. String? coverHorizontal;
  57. String? coverVertical;
  58. GameCover({this.cover, this.coverHorizontal, this.coverVertical});
  59. GameCover.fromJson(Map<String, dynamic> json) {
  60. cover = json['cover'];
  61. coverHorizontal = json['cover_horizontal'];
  62. coverVertical = json['cover_vertical'];
  63. }
  64. Map<String, dynamic> toJson() {
  65. final Map<String, dynamic> data = new Map<String, dynamic>();
  66. data['cover'] = this.cover;
  67. data['cover_horizontal'] = this.coverHorizontal;
  68. data['cover_vertical'] = this.coverVertical;
  69. return data;
  70. }
  71. }