///
/// Code generated by jsonToDartModel https://ashamp.github.io/jsonToDartModel/
///
class ChooseCategoryData {
/*
{
  "id": 1,
  "title": "",
  "color": ""
}
*/

  int? id;
  String? title;
  String? color;

  ChooseCategoryData({
    this.id,
    this.title,
    this.color,
  });
  ChooseCategoryData.fromJson(Map<String, dynamic> json) {
    id = json["id"]?.toInt();
    title = json["title"]?.toString();
    color = json["color"]?.toString();
  }
  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data["id"] = id;
    data["title"] = title;
    data["color"] = color;
    return data;
  }
}

class ChooseCategoryResponse {
/*
{
  "totalRecord": 9,
  "isSuccess": true,
  "errorMesssage": null,
  "Data": [
    {
      "id": 1,
      "title": "",
      "color": ""
    }
  ],
  "message": null
}
*/

  int? totalRecord;
  bool? isSuccess;
  String? errorMesssage;
  List<ChooseCategoryData>? Data;
  String? message;

  ChooseCategoryResponse({
    this.totalRecord,
    this.isSuccess,
    this.errorMesssage,
    this.Data,
    this.message,
  });
  ChooseCategoryResponse.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 = <ChooseCategoryData>[];
      v.forEach((v) {
        arr0.add(ChooseCategoryData.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 (Data != null) {
      final v = Data;
      final arr0 = [];
      v!.forEach((v) {
        arr0.add(v.toJson());
      });
      data["Data"] = arr0;
    }
    data["message"] = message;
    return data;
  }
}
