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.

49 lines
1.2KB

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