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.

61 lines
1.6KB

  1. class CropStatus {
  2. int id;
  3. int cropId;
  4. String executeDate;
  5. num cropRate;
  6. num numberOfTreeToGrow;
  7. num hightOfTree;
  8. num numberOfLeaf;
  9. num leafSize;
  10. String leafColor;
  11. String abilityProduceBuds;
  12. num bodySize;
  13. String note;
  14. CropStatus(
  15. {this.id,
  16. this.cropId,
  17. this.executeDate,
  18. this.cropRate,
  19. this.numberOfTreeToGrow,
  20. this.hightOfTree,
  21. this.numberOfLeaf,
  22. this.leafSize,
  23. this.leafColor,
  24. this.abilityProduceBuds,
  25. this.bodySize,
  26. this.note});
  27. CropStatus.fromJson(Map<String, dynamic> json) {
  28. id = json['id'];
  29. cropId = json['cropId'];
  30. executeDate = json['executeDate'];
  31. cropRate = json['cropRate'];
  32. numberOfTreeToGrow = json['numberOfTreeToGrow'];
  33. hightOfTree = json['hightOfTree'];
  34. numberOfLeaf = json['numberOfLeaf'];
  35. leafSize = json['leafSize'];
  36. leafColor = json['leafColor'];
  37. abilityProduceBuds = json['abilityProduceBuds'];
  38. bodySize = json['bodySize'];
  39. note = json['note'];
  40. }
  41. Map<String, dynamic> toJson() {
  42. final Map<String, dynamic> data = new Map<String, dynamic>();
  43. data['id'] = this.id;
  44. data['cropId'] = this.cropId;
  45. data['executeDate'] = this.executeDate;
  46. data['cropRate'] = this.cropRate;
  47. data['numberOfTreeToGrow'] = this.numberOfTreeToGrow;
  48. data['hightOfTree'] = this.hightOfTree;
  49. data['numberOfLeaf'] = this.numberOfLeaf;
  50. data['leafSize'] = this.leafSize;
  51. data['leafColor'] = this.leafColor;
  52. data['abilityProduceBuds'] = this.abilityProduceBuds;
  53. data['bodySize'] = this.bodySize;
  54. data['note'] = this.note;
  55. return data;
  56. }
  57. }