import 'package:betting/data/model/res/matches/matches.dart';

class Schedule {
  String? date;
  List<Matches>? matches;

  Schedule({this.date, this.matches});

  Schedule.fromJson(Map<String, dynamic> json) {
    date = json['date'];
    if (json['matches'] != null) {
      matches = <Matches>[];
      json['matches'].forEach((v) {
        matches!.add(Matches.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['date'] = date;
    if (matches != null) {
      data['matches'] = matches!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}


class Competition {
  String? sId;
  String? competitionId;
  String? name;
  String? isCup;
  String? logo;

  Competition({this.sId, this.competitionId, this.name, this.isCup, this.logo});

  Competition.fromJson(Map<String, dynamic> json) {
    sId = json['_id'];
    competitionId = json['competitionId'];
    name = json['name'];
    isCup = json['isCup'];
    logo = json['logo'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['_id'] = sId;
    data['competitionId'] = competitionId;
    data['name'] = name;
    data['isCup'] = isCup;
    data['logo'] = logo;
    return data;
  }
}

class Home {
  String? sId;
  String? teamId;
  String? name;
  String? logo;
  bool? favourite;

  Home({this.sId, this.teamId, this.name, this.logo, this.favourite});

  Home.fromJson(Map<String, dynamic> json) {
    sId = json['_id'];
    teamId = json['teamId'];
    name = json['name'];
    logo = json['logo'];
    favourite = json['favourite'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['_id'] = sId;
    data['teamId'] = teamId;
    data['name'] = name;
    data['logo'] = logo;
    data['favourite'] = favourite;
    return data;
  }
}
