///
/// Code generated by jsonToDartModel https://ashamp.github.io/jsonToDartModel/
///
class CatalogData {
/*
{
  "CatalogId": 2,
  "CatalogName": "Kinh nghiệm",
}
*/

  int? catalogId;
  String? catalogName;

  CatalogData({
    this.catalogId,
    this.catalogName,
  });
  CatalogData.fromJson(Map<String, dynamic> json) {
    catalogId = json["CatalogId"]?.toInt();
    catalogName = json["CatalogName"]?.toString();
  }
  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data["CatalogId"] = catalogId;
    data["CatalogName"] = catalogName;
    return data;
  }
}

class CatalogResponse {
/*
{
  "totalRecord": 1,
  "isSuccess": true,
  "errorMesssage": null,
  "Data": [
    {
      "CatalogId": 2,
      "CatalogName": "Kinh nghiệm",
    }
  ],
  "message": null
}
*/

  int? totalRecord;
  bool? isSuccess;
  String? errorMesssage;
  List<CatalogData>? data;
  String? message;

  CatalogResponse({
    this.totalRecord,
    this.isSuccess,
    this.errorMesssage,
    this.data,
    this.message,
  });
  CatalogResponse.fromJson(Map<String, dynamic> json) {
    totalRecord = json["totalRecord"]?.toInt();
    isSuccess = json["isSuccess"];
    errorMesssage = json["errorMesssage"]?.toString();
    if (json["Data"] != null) {
      final v = json["Data"];
      final arr0 = <CatalogData>[];
      v.forEach((v) {
        arr0.add(CatalogData.fromJson(v));
      });
      data = arr0;
    }
    message = json["message"]?.toString();
  }
  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data["totalRecord"] = totalRecord;
    data["isSuccess"] = isSuccess;
    data["errorMesssage"] = errorMesssage;
    if (this.data != null) {
      final v = this.data;
      final arr0 = [];
      v!.forEach((v) {
        arr0.add(v.toJson());
      });
      data["Data"] = arr0;
    }
    data["message"] = message;
    return data;
  }
}
