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.

53 lines
1.5KB

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