import 'package:json_annotation/json_annotation.dart';
import 'GameInfo.dart';
import 'PlayerInfo.dart';

part 'CompetitionSeason.g.dart';

@JsonSerializable()
class CompetitionSeason {
  CompetitionSeason(this.id, this.season, this.shortName, this.beginTime, this.endTime,
      this.bonus, this.statusFlag, this.gameId,this.gameInfo,this.playerInfo);
  int id;
  String season;//名称
  String shortName;//简称
  int beginTime;//开始时间
  int endTime;//结束时间
  int bonus;//奖金数
  int statusFlag;//状态
  int gameId; //游戏ID
  GameInfo gameInfo;//游戏信息
  PlayerInfo playerInfo;
  
  factory CompetitionSeason.fromJson(Map<String, dynamic> json) =>
      _$CompetitionSeasonFromJson(json);

  Map<String, dynamic> toJson() => _$CompetitionSeasonToJson(this);
  // 命名构造函数
  CompetitionSeason.empty();
  @override
  String toString() {
    return _$CompetitionSeasonToJson(this).toString();
  }
}
