class RequestDisease {
  int? id;
  int? activityId;
  int? cropId;
  String? executeDate;
  String? description;
  List<String>? mediaDel;
  List<ObjectUpdateDetail>? objectUpdateDetail;

  RequestDisease({this.id, this.activityId, this.cropId, this.executeDate, this.description, this.mediaDel, this.objectUpdateDetail});

  RequestDisease.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    activityId = json['activityId'];
    cropId = json['cropId'];
    executeDate = json['executeDate'];
    description = json['description'];
    if (json['objectUpdateDetail'] != null) {
      objectUpdateDetail = <ObjectUpdateDetail>[];
      json['objectUpdateDetail'].forEach((v) {
        objectUpdateDetail?.add(ObjectUpdateDetail.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final data = <String, dynamic>{};
    data['id'] = id;
    data['cropId'] = cropId;
    data['activityId'] = activityId;
    data['executeDate'] = executeDate;
    data['description'] = description;
    data['media_del'] = mediaDel;
    if (objectUpdateDetail != null) {
      data['objectUpdateDetail'] = objectUpdateDetail?.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class ObjectUpdateDetail {
  int? id;
  String? name;
  String? index;

  ObjectUpdateDetail({this.id, this.name, this.index});

  ObjectUpdateDetail.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
    index = json['index'];
  }

  Map<String, dynamic> toJson() {
    final data = <String, dynamic>{};
    data['id'] = id;
    data['name'] = name;
    data['index'] = index;
    return data;
  }
}
