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.

52 lines
1.2KB

  1. class UseWater {
  2. int id;
  3. int activityId;
  4. int cropId;
  5. String executeDate;
  6. String media;
  7. List<String> mediaDel;
  8. String waterType;
  9. num amount;
  10. String description;
  11. String executeBy;
  12. UseWater(
  13. {this.id,
  14. this.activityId,
  15. this.cropId,
  16. this.executeDate,
  17. this.media,
  18. this.mediaDel,
  19. this.waterType,
  20. this.amount,
  21. this.description,
  22. this.executeBy});
  23. UseWater.fromJson(Map<String, dynamic> json) {
  24. id = json['id'];
  25. activityId = json['activityId'];
  26. cropId = json['cropId'];
  27. executeDate = json['executeDate'];
  28. media = json['media'];
  29. waterType = json['waterType'];
  30. amount = json['amount'];
  31. description = json['description'];
  32. executeBy = json['executeBy'];
  33. }
  34. Map<String, dynamic> toJson() {
  35. final Map<String, dynamic> data = new Map<String, dynamic>();
  36. data['id'] = this.id;
  37. data['activityId'] = this.activityId;
  38. data['cropId'] = this.cropId;
  39. data['executeDate'] = this.executeDate;
  40. data['media'] = this.media;
  41. data['media_del'] = this.mediaDel;
  42. data['waterType'] = this.waterType;
  43. data['amount'] = this.amount;
  44. data['description'] = this.description;
  45. data['executeBy'] = this.executeBy;
  46. return data;
  47. }
  48. }