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

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

  RequestGeneralModel.fromJson(Map<String, dynamic> json) {
    cropId = json['cropId'];
    activityId = json['activityId'];
    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['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 {
  String? name;
  String? index;

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

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

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