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

  Map<String, dynamic> toJson() {
    final data = <String, dynamic>{};
    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 {
  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 data = <String, dynamic>{};
    data['name'] = name;
    data['index'] = index;
    return data;
  }
}
