123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- import 'package:sport/bean/rank_game_info.dart';
- import 'package:sport/bean/sport_detail.dart';
- import 'package:sport/services/Converter.dart';
- class GameInfoData {
- int id;
- String name;
- List<String> tags;
- String cover;
- String coverHorizontal;
- String coverVertical;
- String introduceVideo;
- String introduceVideoCover;
- String introduce;
- List<String> introduceImages;
- double fileSize;
- String publishDate;
- String developCompany;
- int likeCount;
- int userCount;
- String version;
- String downloadUrl;
- int subjectId;
- String playTime;
- int durationTotal;
- GamesSum sum;
- bool isLike;
- int fileSizeByte;
- String packageNameIos,packageNameAndroid;
- Rank rank;
- bool isLocal;
- int difficulty;
- GameInfoData({
- this.id,
- this.name,
- this.tags,
- this.cover,
- this.coverHorizontal,
- this.coverVertical,
- this.introduceVideo,
- this.introduceVideoCover,
- this.introduce,
- this.introduceImages,
- this.fileSize,
- this.publishDate,
- this.developCompany,
- this.likeCount,
- this.userCount,
- this.version,
- this.downloadUrl,
- this.subjectId,
- this.isLike,
- this.fileSizeByte,
- this.packageNameIos,
- this.packageNameAndroid,
- this.isLocal,
- this.playTime,
- this.durationTotal,});
- GameInfoData.fromJson(Map<String, dynamic> json) {
- id = json['id'];
- name = json['name'];
- tags = json['tags'].cast<String>();
- cover = json['cover'];
- coverHorizontal = json['cover_horizontal'];
- coverVertical = json['cover_vertical'];
- introduceVideo = json['introduce_video'];
- introduceVideoCover = json['introduce_video_cover'];
- introduce = json['introduce'];
- introduceImages = json['introduce_images'].cast<String>();
- fileSize = Converter.toDouble(json['file_size']);
- publishDate = json['publish_date'];
- developCompany = json['develop_company'];
- likeCount = json['like_count'];
- userCount = json['user_count'];
- version = json['version'];
- downloadUrl = json['download_url'];
- subjectId = json['subject_id'];
- playTime = json['play_time'];
- durationTotal = json['duration_total'];
- sum = json['sum'] != null ? new GamesSum.fromJson(json['sum']) : null;
- isLike = json['is_like'];
- fileSizeByte = json['file_size_byte'];
- packageNameIos = json['package_name_ios'];
- packageNameAndroid = json['package_name_android'];
- rank = json['rank'] != null ? new Rank.fromJson(json['rank']) : null;
- isLocal = json['isLocal'];
- difficulty = json['difficulty'];
- }
- Map<String, dynamic> toJson() {
- final Map<String, dynamic> data = new Map<String, dynamic>();
- data['id'] = this.id;
- data['name'] = this.name;
- data['tags'] = this.tags;
- data['cover'] = this.cover;
- data['cover_horizontal'] = this.coverHorizontal;
- data['cover_vertical'] = this.coverVertical;
- data['cover_vertical'] = this.coverVertical;
- data['introduce_video'] = this.introduceVideo;
- data['introduce_video_cover'] = this.introduceVideoCover;
- data['introduce'] = this.introduce;
- data['introduce_images'] = this.introduceImages;
- data['file_size'] = this.fileSize;
- data['publish_date'] = this.publishDate;
- data['develop_company'] = this.developCompany;
- data['like_count'] = this.likeCount;
- data['user_count'] = this.userCount;
- data['version'] = this.version;
- data['download_url'] = this.downloadUrl;
- data['subject_id'] = this.subjectId;
- data['play_time'] = this.playTime;
- data['duration_total'] = this.durationTotal;
- data['is_like'] = this.isLike;
- data['file_size_byte'] = this.fileSizeByte;
- data['isLocal'] = this.isLocal;
- data['package_name_ios'] = this.packageNameIos;
- data['package_name_android'] = this.packageNameAndroid;
- if (this.rank != null) {
- data['rank'] = this.rank.toJson();
- }
- data['difficulty'] = this.difficulty;
- return data;
- }
- }
|