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.

57 lines
1.6KB

  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. num collectedQuantityLv1;
  10. num collectedQuantityLv2;
  11. num collectedQuantityLv3;
  12. num removedQuantity;
  13. Harvest(
  14. {this.id,
  15. this.cropId,
  16. this.activityId,
  17. this.executeDate,
  18. this.description,
  19. this.executeBy,
  20. this.media,
  21. this.collectedQuantityLv1,
  22. this.collectedQuantityLv2,
  23. this.collectedQuantityLv3,
  24. this.removedQuantity});
  25. Harvest.fromJson(Map<String, dynamic> json) {
  26. id = json['id'];
  27. cropId = json['cropId'];
  28. activityId = json['activityId'];
  29. executeDate = json['executeDate'];
  30. description = json['description'];
  31. executeBy = json['executeBy'];
  32. media = json['media'];
  33. collectedQuantityLv1 = json['collectedQuantityLv1'];
  34. collectedQuantityLv2 = json['collectedQuantityLv2'];
  35. collectedQuantityLv3 = json['collectedQuantityLv3'];
  36. removedQuantity = json['removedQuantity'];
  37. }
  38. Map<String, dynamic> toJson() {
  39. final Map<String, dynamic> data = new Map<String, dynamic>();
  40. data['id'] = this.id;
  41. data['cropId'] = this.cropId;
  42. data['activityId'] = this.activityId;
  43. data['executeDate'] = this.executeDate;
  44. data['description'] = this.description;
  45. data['executeBy'] = this.executeBy;
  46. data['media'] = this.media;
  47. data['collectedQuantityLv1'] = this.collectedQuantityLv1;
  48. data['collectedQuantityLv2'] = this.collectedQuantityLv2;
  49. data['collectedQuantityLv3'] = this.collectedQuantityLv3;
  50. data['removedQuantity'] = this.removedQuantity;
  51. return data;
  52. }
  53. }