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.

45 lines
1.3KB

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