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.

95 lines
2.5KB

  1. import 'CropPlot.dart';
  2. class TbCropDTO {
  3. int? id;
  4. String? qrCode;
  5. String? code;
  6. num? areaM2;
  7. int? tbCropTypeId;
  8. String? startDate;
  9. String? endDate;
  10. String? status;
  11. String? description;
  12. int? ageDayStartAt;
  13. int? tbSuppliesId;
  14. String? suppliesName;
  15. int? tbGuidelineId;
  16. int? netHouseId;
  17. String? netHouseName;
  18. int? areaId;
  19. String? area;
  20. List<TbDetailUsers>? tbDetailUsers;
  21. TbCropDTO({
  22. this.id,
  23. this.qrCode,
  24. this.code,
  25. this.areaM2,
  26. this.tbCropTypeId,
  27. this.startDate,
  28. this.endDate,
  29. this.status,
  30. this.description,
  31. this.ageDayStartAt,
  32. this.tbSuppliesId,
  33. this.suppliesName,
  34. this.tbGuidelineId,
  35. this.netHouseId,
  36. this.netHouseName,
  37. this.areaId,
  38. this.area,
  39. this.tbDetailUsers,
  40. });
  41. TbCropDTO.fromJson(Map<String, dynamic> json) {
  42. id = json['id'];
  43. qrCode = json['qrCode'];
  44. code = json['code'];
  45. areaM2 = json['areaM2'];
  46. tbCropTypeId = json['tbCropTypeId'];
  47. startDate = json['startDate'];
  48. endDate = json['endDate'];
  49. status = json['status'];
  50. description = json['description'];
  51. ageDayStartAt = json['ageDayStartAt'];
  52. tbSuppliesId = json['tbSuppliesId'];
  53. suppliesName = json['suppliesName'];
  54. tbGuidelineId = json['tbGuidelineId'];
  55. netHouseId = json['netHouseId'];
  56. netHouseName = json['netHouseName'];
  57. areaId = json['areaId'];
  58. area = json['area'];
  59. if (json['tbDetailUsers'] != null) {
  60. tbDetailUsers = <TbDetailUsers>[];
  61. json['tbDetailUsers'].forEach((v) {
  62. tbDetailUsers?.add(new TbDetailUsers.fromJson(v));
  63. });
  64. }
  65. }
  66. Map<String, dynamic> toJson() {
  67. final Map<String, dynamic> data = new Map<String, dynamic>();
  68. data['id'] = this.id;
  69. data['qrCode'] = this.qrCode;
  70. data['code'] = this.code;
  71. data['areaM2'] = this.areaM2;
  72. data['tbCropTypeId'] = this.tbCropTypeId;
  73. data['startDate'] = this.startDate;
  74. data['endDate'] = this.endDate;
  75. data['status'] = this.status;
  76. data['description'] = this.description;
  77. data['ageDayStartAt'] = this.ageDayStartAt;
  78. data['tbSuppliesId'] = this.tbSuppliesId;
  79. data['suppliesName'] = this.suppliesName;
  80. data['tbGuidelineId'] = this.tbGuidelineId;
  81. data['netHouseId'] = this.netHouseId;
  82. data['netHouseName'] = this.netHouseName;
  83. data['areaId'] = this.areaId;
  84. data['area'] = this.area;
  85. if (this.tbDetailUsers != null) {
  86. data['tbDetailUsers'] = this.tbDetailUsers?.map((v) => v.toJson()).toList();
  87. }
  88. return data;
  89. }
  90. }