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.

65 lines
1.7KB

  1. class Disease {
  2. int id;
  3. int activityId;
  4. int cropId;
  5. String executeDate;
  6. String media;
  7. String typesOfPest;
  8. String harmLevel;
  9. String treePercent;
  10. String location;
  11. String naturalEnemy;
  12. String treatmentMeasures;
  13. String description;
  14. String executeBy;
  15. Disease(
  16. {this.id,
  17. this.activityId,
  18. this.cropId,
  19. this.executeDate,
  20. this.media,
  21. this.typesOfPest,
  22. this.harmLevel,
  23. this.treePercent,
  24. this.location,
  25. this.naturalEnemy,
  26. this.treatmentMeasures,
  27. this.description,
  28. this.executeBy});
  29. Disease.fromJson(Map<String, dynamic> json) {
  30. id = json['id'];
  31. activityId = json['activityId'];
  32. cropId = json['cropId'];
  33. executeDate = json['executeDate'];
  34. media = json['media'];
  35. typesOfPest = json['typesOfPest'];
  36. harmLevel = json['harmLevel'];
  37. treePercent = json['treePercent'];
  38. location = json['location'];
  39. naturalEnemy = json['naturalEnemy'];
  40. treatmentMeasures = json['treatmentMeasures'];
  41. description = json['description'];
  42. executeBy = json['executeBy'];
  43. }
  44. Map<String, dynamic> toJson() {
  45. final Map<String, dynamic> data = new Map<String, dynamic>();
  46. data['id'] = this.id;
  47. data['activityId'] = this.activityId;
  48. data['cropId'] = this.cropId;
  49. data['executeDate'] = this.executeDate;
  50. data['media'] = this.media;
  51. data['typesOfPest'] = this.typesOfPest;
  52. data['harmLevel'] = this.harmLevel;
  53. data['treePercent'] = this.treePercent;
  54. data['location'] = this.location;
  55. data['naturalEnemy'] = this.naturalEnemy;
  56. data['treatmentMeasures'] = this.treatmentMeasures;
  57. data['description'] = this.description;
  58. data['executeBy'] = this.executeBy;
  59. return data;
  60. }
  61. }