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.8KB

  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. RequestDisease.fromJson(Map<String, dynamic> json) {
  18. id = json['id'];
  19. activityId = json['activityId'];
  20. cropId = json['cropId'];
  21. executeDate = json['executeDate'];
  22. description = json['description'];
  23. if (json['objectUpdateDetail'] != null) {
  24. objectUpdateDetail = new List<ObjectUpdateDetail>();
  25. json['objectUpdateDetail'].forEach((v) {
  26. objectUpdateDetail.add(new ObjectUpdateDetail.fromJson(v));
  27. });
  28. }
  29. }
  30. Map<String, dynamic> toJson() {
  31. final Map<String, dynamic> data = new Map<String, dynamic>();
  32. data['id'] = this.id;
  33. data['cropId'] = this.cropId;
  34. data['activityId'] = this.activityId;
  35. data['executeDate'] = this.executeDate;
  36. data['description'] = this.description;
  37. data['media_del'] = this.mediaDel;
  38. if (this.objectUpdateDetail != null) {
  39. data['objectUpdateDetail'] =
  40. 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. }