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.

67 lines
1.7KB

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