You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.6KB

  1. class RequestGeneralModel {
  2. int? cropId;
  3. int? activityId;
  4. String? executeDate;
  5. String? description;
  6. List<String>? mediaDel;
  7. List<ObjectUpdateDetail>? objectUpdateDetail;
  8. RequestGeneralModel({
  9. this.cropId,
  10. this.activityId,
  11. this.executeDate,
  12. this.description,
  13. this.mediaDel,
  14. this.objectUpdateDetail,
  15. });
  16. RequestGeneralModel.fromJson(Map<String, dynamic> json) {
  17. cropId = json['cropId'];
  18. activityId = json['activityId'];
  19. executeDate = json['executeDate'];
  20. description = json['description'];
  21. if (json['objectUpdateDetail'] != null) {
  22. objectUpdateDetail = <ObjectUpdateDetail>[];
  23. json['objectUpdateDetail'].forEach((v) {
  24. objectUpdateDetail?.add(new ObjectUpdateDetail.fromJson(v));
  25. });
  26. }
  27. }
  28. Map<String, dynamic> toJson() {
  29. final Map<String, dynamic> data = new Map<String, dynamic>();
  30. data['cropId'] = this.cropId;
  31. data['activityId'] = this.activityId;
  32. data['executeDate'] = this.executeDate;
  33. data['description'] = this.description;
  34. data['media_del'] = this.mediaDel;
  35. if (this.objectUpdateDetail != null) {
  36. data['objectUpdateDetail'] = this.objectUpdateDetail?.map((v) => v.toJson()).toList();
  37. }
  38. return data;
  39. }
  40. }
  41. class ObjectUpdateDetail {
  42. String? name;
  43. String? index;
  44. ObjectUpdateDetail({this.name, this.index});
  45. ObjectUpdateDetail.fromJson(Map<String, dynamic> json) {
  46. name = json['name'];
  47. index = json['index'];
  48. }
  49. Map<String, dynamic> toJson() {
  50. final Map<String, dynamic> data = new Map<String, dynamic>();
  51. data['name'] = this.name;
  52. data['index'] = this.index;
  53. return data;
  54. }
  55. }