class CountryModel {
  int totalItemsCount;
  int statusCode;
  String message;
  List<CountryModelData> data;

  CountryModel({this.totalItemsCount, this.statusCode, this.message, this.data});

  CountryModel.fromJson(Map<String, dynamic> json) {
    totalItemsCount = json['totalItemsCount'];
    statusCode = json['statusCode'];
    message = json['message'];
    if (json['data'] != null) {
      data = [];
      json['data'].forEach((v) {
        data.add(new CountryModelData.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['totalItemsCount'] = this.totalItemsCount;
    data['statusCode'] = this.statusCode;
    data['message'] = this.message;
    if (this.data != null) {
      data['data'] = this.data.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class CountryModelData {
  int countryId;
  String countryCode;
  String countryNameEn;
  String countryNameAr;
  String countryFlag;

  CountryModelData({this.countryId, this.countryCode, this.countryNameEn, this.countryNameAr, this.countryFlag});

  CountryModelData.fromJson(Map<String, dynamic> json) {
    countryId = json['countryId'];
    countryCode = json['countryCode'];
    countryNameEn = json['countryNameEn'];
    countryNameAr = json['countryNameAr'];
    countryFlag = json['countryFlag'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['countryId'] = this.countryId;
    data['countryCode'] = this.countryCode;
    data['countryNameEn'] = this.countryNameEn;
    data['countryNameAr'] = this.countryNameAr;
    data['countryFlag'] = this.countryFlag;
    return data;
  }
}
