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.

60 lines
1.7KB

  1. class Harvest {
  2. int id;
  3. int cropId;
  4. int activityId;
  5. String executeDate;
  6. String description;
  7. String executeBy;
  8. String media;
  9. List<String> mediaDel;
  10. num collectedQuantityLv1;
  11. num collectedQuantityLv2;
  12. num collectedQuantityLv3;
  13. num removedQuantity;
  14. Harvest(
  15. {this.id,
  16. this.cropId,
  17. this.activityId,
  18. this.executeDate,
  19. this.description,
  20. this.executeBy,
  21. this.media,
  22. this.mediaDel,
  23. this.collectedQuantityLv1,
  24. this.collectedQuantityLv2,
  25. this.collectedQuantityLv3,
  26. this.removedQuantity});
  27. Harvest.fromJson(Map<String, dynamic> json) {
  28. id = json['id'];
  29. cropId = json['cropId'];
  30. activityId = json['activityId'];
  31. executeDate = json['executeDate'];
  32. description = json['description'];
  33. executeBy = json['executeBy'];
  34. media = json['media'];
  35. collectedQuantityLv1 = json['collectedQuantityLv1'];
  36. collectedQuantityLv2 = json['collectedQuantityLv2'];
  37. collectedQuantityLv3 = json['collectedQuantityLv3'];
  38. removedQuantity = json['removedQuantity'];
  39. }
  40. Map<String, dynamic> toJson() {
  41. final Map<String, dynamic> data = new Map<String, dynamic>();
  42. data['id'] = this.id;
  43. data['cropId'] = this.cropId;
  44. data['activityId'] = this.activityId;
  45. data['executeDate'] = this.executeDate;
  46. data['description'] = this.description;
  47. data['executeBy'] = this.executeBy;
  48. data['media'] = this.media;
  49. data['media_del'] = this.mediaDel;
  50. data['collectedQuantityLv1'] = this.collectedQuantityLv1;
  51. data['collectedQuantityLv2'] = this.collectedQuantityLv2;
  52. data['collectedQuantityLv3'] = this.collectedQuantityLv3;
  53. data['removedQuantity'] = this.removedQuantity;
  54. return data;
  55. }
  56. }