123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- import 'dart:convert';
- import 'package:sport/generated/json/base/json_field.dart';
- import 'package:sport/generated/json/game_add_entity.g.dart';
- @JsonSerializable()
- class GameAddEntity {
- late int id;
- @JSONField(name: "rank_result")
- late List<GameAddRankResult> rankResult;
- late GameAddRecord record;
- @JSONField(name: "achievements_result")
- late GameAddAchievementsResult achievementsResult;
-
- GameAddEntity();
- factory GameAddEntity.fromJson(Map<String, dynamic> json) => $GameAddEntityFromJson(json);
- Map<String, dynamic> toJson() => $GameAddEntityToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class GameAddRankResult {
- late int up;
- late int position;
- late String result;
- late GameAddRankResultRank rank;
-
- GameAddRankResult();
- factory GameAddRankResult.fromJson(Map<String, dynamic> json) => $GameAddRankResultFromJson(json);
- Map<String, dynamic> toJson() => $GameAddRankResultToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class GameAddRankResultRank {
- late int id;
- late String name;
- @JSONField(name: "is_game")
- late int isGame;
- @JSONField(name: "is_sport")
- late int isSport;
- @JSONField(name: "game_id")
- late int gameId;
- late String introduce;
- @JSONField(name: "user_count_max")
- late int userCountMax;
- @JSONField(name: "rate_begin")
- late String rateBegin;
- @JSONField(name: "rate_end")
- late String rateEnd;
- late String field;
- late String slogan;
- late List<GameAddRankResultRankReward> reward;
- @JSONField(name: "introduce_detail")
- late String introduceDetail;
- late String rule;
- late String distribute;
- dynamic game;
-
- GameAddRankResultRank();
- factory GameAddRankResultRank.fromJson(Map<String, dynamic> json) => $GameAddRankResultRankFromJson(json);
- Map<String, dynamic> toJson() => $GameAddRankResultRankToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class GameAddRankResultRankReward {
- late int begin;
- late int end;
- late int score;
-
- GameAddRankResultRankReward();
- factory GameAddRankResultRankReward.fromJson(Map<String, dynamic> json) => $GameAddRankResultRankRewardFromJson(json);
- Map<String, dynamic> toJson() => $GameAddRankResultRankRewardToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class GameAddRecord {
- @JSONField(name: "record_id")
- late int recordId;
- @JSONField(name: "created_at")
- late String createdAt;
- late int duration;
- late int consume;
- late double met;
- @JSONField(name: "duration_min")
- late double durationMin;
- late int equivalent;
- late String unit;
-
- GameAddRecord();
- factory GameAddRecord.fromJson(Map<String, dynamic> json) => $GameAddRecordFromJson(json);
- Map<String, dynamic> toJson() => $GameAddRecordToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class GameAddAchievementsResult {
- late List<dynamic> achievements;
- late bool level;
-
- GameAddAchievementsResult();
- factory GameAddAchievementsResult.fromJson(Map<String, dynamic> json) => $GameAddAchievementsResultFromJson(json);
- Map<String, dynamic> toJson() => $GameAddAchievementsResultToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
|