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(new ObjectUpdateDetail.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['cropId'] = this.cropId;
    data['activityId'] = this.activityId;
    data['executeDate'] = this.executeDate;
    data['description'] = this.description;
    data['media_del'] = this.mediaDel;
    if (this.objectUpdateDetail != null) {
      data['objectUpdateDetail'] = this.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 Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['name'] = this.name;
    data['index'] = this.index;
    return data;
  }
}
