class SurahModel {
  int? totalItemsCount;
  int? statusCode;
  String? message;
  List<SurahModelData>? data;

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

  SurahModel.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(SurahModelData.fromJson(v));
      });
    }
  }

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

class SurahModelData {
  int? id;
  int? surahID;
  String? nameAR;
  String? nameEN;
  int? numberOfAyahs;
  String? englishNameTranslation;
  int? revelationID;
  String? revelationType;
  int? startPageNo;
  int? endPageNo;

  SurahModelData({this.id, this.surahID, this.nameAR, this.nameEN, this.numberOfAyahs, this.englishNameTranslation, this.revelationID, this.revelationType, this.startPageNo, this.endPageNo});

  SurahModelData.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    surahID = json['surahID'];
    nameAR = json['nameAR'];
    nameEN = json['nameEN'];
    numberOfAyahs = json['numberOfAyahs'];
    englishNameTranslation = json['englishNameTranslation'];
    revelationID = json['revelation_ID'];
    revelationType = json['revelationType'];
    startPageNo = json['startPageNo'];
    endPageNo = json['endPageNo'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['surahID'] = this.surahID;
    data['nameAR'] = this.nameAR;
    data['nameEN'] = this.nameEN;
    data['numberOfAyahs'] = this.numberOfAyahs;
    data['englishNameTranslation'] = this.englishNameTranslation;
    data['revelation_ID'] = this.revelationID;
    data['revelationType'] = this.revelationType;
    data['startPageNo'] = this.startPageNo;
    data['endPageNo'] = this.endPageNo;
    return data;
  }
}
