GameInfoSeasons.dart 663 B

123456789101112131415161718192021222324
  1. import 'package:json_annotation/json_annotation.dart';
  2. import 'CompetitionSeason.dart';
  3. part 'GameInfoSeasons.g.dart';
  4. @JsonSerializable()
  5. class GameInfoSeasons {
  6. GameInfoSeasons(this.id, this.gameName, this.typeFlag,this.competitionSeason);
  7. int id;
  8. String gameName;//名称
  9. int typeFlag;//类型
  10. CompetitionSeason competitionSeason;
  11. factory GameInfoSeasons.fromJson(Map<String, dynamic> json) =>
  12. _$GameInfoSeasonsFromJson(json);
  13. Map<String, dynamic> toJson() => _$GameInfoSeasonsToJson(this);
  14. // 命名构造函数
  15. GameInfoSeasons.empty();
  16. @override
  17. String toString() {
  18. return _$GameInfoSeasonsToJson(this).toString();
  19. }
  20. }