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.

70 lines
1.7KB

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