class CompetitionStandings {
  String? sId;
  String? leagueId;
  String? season;
  Team? team;
  String? competition;
  String? seasonId;
  String? groupId;
  String? teamId;
  String? competitionId;
  String? stageId;
  String? name;
  String? rank;
  String? points;
  String? matches;
  String? goalDiff;
  String? goalsScored;
  String? goalsConceded;
  String? lost;
  String? drawn;
  String? won;
  String? groupName;
  String? stageName;
  int? iV;
  String? category;

  CompetitionStandings(
      {this.sId,
        this.leagueId,
        this.season,
        this.team,
        this.competition,
        this.seasonId,
        this.groupId,
        this.teamId,
        this.competitionId,
        this.stageId,
        this.name,
        this.rank,
        this.points,
        this.matches,
        this.goalDiff,
        this.goalsScored,
        this.goalsConceded,
        this.lost,
        this.drawn,
        this.won,
        this.groupName,
        this.stageName,
        this.iV,
        this.category});

  CompetitionStandings.fromJson(Map<String, dynamic> json) {
    sId = json['_id'];
    leagueId = json['leagueId'];
    season = json['season'];
    team = json['team'] != null ? new Team.fromJson(json['team']) : null;
    competition = json['competition'];
    seasonId = json['seasonId'];
    groupId = json['groupId'];
    teamId = json['teamId'];
    competitionId = json['competitionId'];
    stageId = json['stageId'];
    name = json['name'];
    rank = json['rank'];
    points = json['points'];
    matches = json['matches'];
    goalDiff = json['goalDiff'];
    goalsScored = json['goalsScored'];
    goalsConceded = json['goalsConceded'];
    lost = json['lost'];
    drawn = json['drawn'];
    won = json['won'];
    groupName = json['groupName'];
    stageName = json['stageName'];
    iV = json['__v'];
    category = json['category'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['_id'] = this.sId;
    data['leagueId'] = this.leagueId;
    data['season'] = this.season;
    if (this.team != null) {
      data['team'] = this.team!.toJson();
    }
    data['competition'] = this.competition;
    data['seasonId'] = this.seasonId;
    data['groupId'] = this.groupId;
    data['teamId'] = this.teamId;
    data['competitionId'] = this.competitionId;
    data['stageId'] = this.stageId;
    data['name'] = this.name;
    data['rank'] = this.rank;
    data['points'] = this.points;
    data['matches'] = this.matches;
    data['goalDiff'] = this.goalDiff;
    data['goalsScored'] = this.goalsScored;
    data['goalsConceded'] = this.goalsConceded;
    data['lost'] = this.lost;
    data['drawn'] = this.drawn;
    data['won'] = this.won;
    data['groupName'] = this.groupName;
    data['stageName'] = this.stageName;
    data['__v'] = this.iV;
    data['category'] = this.category;
    return data;
  }
}

class Team {
  String? sId;
  String? teamId;
  String? name;
  String? stadium;
  String? createdAt;
  String? updatedAt;
  int? iV;
  String? logo;
  String? country;
  String? category;

  Team(
      {this.sId,
        this.teamId,
        this.name,
        this.stadium,
        this.createdAt,
        this.updatedAt,
        this.iV,
        this.logo,
        this.country,
        this.category});

  Team.fromJson(Map<String, dynamic> json) {
    sId = json['_id'];
    teamId = json['teamId'];
    name = json['name'];
    stadium = json['stadium'];
    createdAt = json['createdAt'];
    updatedAt = json['updatedAt'];
    iV = json['__v'];
    logo = json['logo'];
    country = json['country'];
    category = json['category'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['_id'] = this.sId;
    data['teamId'] = this.teamId;
    data['name'] = this.name;
    data['stadium'] = this.stadium;
    data['createdAt'] = this.createdAt;
    data['updatedAt'] = this.updatedAt;
    data['__v'] = this.iV;
    data['logo'] = this.logo;
    data['country'] = this.country;
    data['category'] = this.category;
    return data;
  }
}
