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.

37 lines
850B

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