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.5KB

  1. class Packing {
  2. int id;
  3. int cropId;
  4. int activityId;
  5. int harvestId;
  6. String executeDate;
  7. String description;
  8. String media;
  9. num quantityLv1;
  10. num quantityLv2;
  11. num quantityLv3;
  12. num removedQuantity;
  13. Packing(
  14. {this.id,
  15. this.cropId,
  16. this.activityId,
  17. this.harvestId,
  18. this.executeDate,
  19. this.description,
  20. this.media,
  21. this.quantityLv1,
  22. this.quantityLv2,
  23. this.quantityLv3,
  24. this.removedQuantity});
  25. Packing.fromJson(Map<String, dynamic> json) {
  26. id = json['id'];
  27. cropId = json['cropId'];
  28. activityId = json['activityId'];
  29. harvestId = json['harvestId'];
  30. executeDate = json['executeDate'];
  31. description = json['description'];
  32. media = json['media'];
  33. quantityLv1 = json['quantityLv1'];
  34. quantityLv2 = json['quantityLv2'];
  35. quantityLv3 = json['quantityLv3'];
  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['harvestId'] = this.harvestId;
  44. data['executeDate'] = this.executeDate;
  45. data['description'] = this.description;
  46. data['media'] = this.media;
  47. data['quantityLv1'] = this.quantityLv1;
  48. data['quantityLv2'] = this.quantityLv2;
  49. data['quantityLv3'] = this.quantityLv3;
  50. data['removedQuantity'] = this.removedQuantity;
  51. return data;
  52. }
  53. }