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.

114 lines
3.5KB

  1. class RequestActivity {
  2. int tbActivityTypeId;
  3. int tbCropId;
  4. int totalCost;
  5. String executeDate;
  6. String externalTable;
  7. String description;
  8. List<TbObjectUpdateDTOList> tbObjectUpdateDTOList;
  9. List<TbSuppliesUsingDetailsDTOs> tbSuppliesUsingDetailsDTOs;
  10. RequestActivity(
  11. {this.tbActivityTypeId,
  12. this.tbCropId,
  13. this.totalCost,
  14. this.executeDate,
  15. this.externalTable,
  16. this.description,
  17. this.tbObjectUpdateDTOList,
  18. this.tbSuppliesUsingDetailsDTOs});
  19. RequestActivity.fromJson(Map<String, dynamic> json) {
  20. tbActivityTypeId = json['tbActivityTypeId'];
  21. tbCropId = json['tbCropId'];
  22. totalCost = json['totalCost'];
  23. executeDate = json['executeDate'];
  24. externalTable = json['externalTable'];
  25. description = json['description'];
  26. if (json['tbObjectUpdateDTOList'] != null) {
  27. tbObjectUpdateDTOList = new List<TbObjectUpdateDTOList>();
  28. json['tbObjectUpdateDTOList'].forEach((v) {
  29. tbObjectUpdateDTOList.add(new TbObjectUpdateDTOList.fromJson(v));
  30. });
  31. }
  32. if (json['tbSuppliesUsingDetailsDTOs'] != null) {
  33. tbSuppliesUsingDetailsDTOs = new List<TbSuppliesUsingDetailsDTOs>();
  34. json['tbSuppliesUsingDetailsDTOs'].forEach((v) {
  35. tbSuppliesUsingDetailsDTOs
  36. .add(new TbSuppliesUsingDetailsDTOs.fromJson(v));
  37. });
  38. }
  39. }
  40. Map<String, dynamic> toJson() {
  41. final Map<String, dynamic> data = new Map<String, dynamic>();
  42. data['tbActivityTypeId'] = this.tbActivityTypeId;
  43. data['tbCropId'] = this.tbCropId;
  44. data['totalCost'] = this.totalCost;
  45. data['executeDate'] = this.executeDate;
  46. data['externalTable'] = this.externalTable;
  47. data['description'] = this.description;
  48. if (this.tbObjectUpdateDTOList != null) {
  49. data['tbObjectUpdateDTOList'] =
  50. this.tbObjectUpdateDTOList.map((v) => v.toJson()).toList();
  51. }
  52. if (this.tbSuppliesUsingDetailsDTOs != null) {
  53. data['tbSuppliesUsingDetailsDTOs'] =
  54. this.tbSuppliesUsingDetailsDTOs.map((v) => v.toJson()).toList();
  55. }
  56. return data;
  57. }
  58. }
  59. class TbObjectUpdateDTOList {
  60. int tbObjectParameterId;
  61. String index;
  62. TbObjectUpdateDTOList({this.tbObjectParameterId, this.index});
  63. TbObjectUpdateDTOList.fromJson(Map<String, dynamic> json) {
  64. tbObjectParameterId = json['tbObjectParameterId'];
  65. index = json['index'];
  66. }
  67. Map<String, dynamic> toJson() {
  68. final Map<String, dynamic> data = new Map<String, dynamic>();
  69. data['tbObjectParameterId'] = this.tbObjectParameterId;
  70. data['index'] = this.index;
  71. return data;
  72. }
  73. }
  74. class TbSuppliesUsingDetailsDTOs {
  75. int tbSuppliesInWarehouseId;
  76. String dosage;
  77. int quantity;
  78. int tbEquipmentOfCustomerId;
  79. String howToUse;
  80. TbSuppliesUsingDetailsDTOs(
  81. {this.tbSuppliesInWarehouseId,
  82. this.dosage,
  83. this.quantity,
  84. this.tbEquipmentOfCustomerId,
  85. this.howToUse});
  86. TbSuppliesUsingDetailsDTOs.fromJson(Map<String, dynamic> json) {
  87. tbSuppliesInWarehouseId = json['tbSuppliesInWarehouseId'];
  88. dosage = json['dosage'];
  89. quantity = json['quantity'];
  90. tbEquipmentOfCustomerId = json['tbEquipmentOfCustomerId'];
  91. howToUse = json['howToUse'];
  92. }
  93. Map<String, dynamic> toJson() {
  94. final Map<String, dynamic> data = new Map<String, dynamic>();
  95. data['tbSuppliesInWarehouseId'] = this.tbSuppliesInWarehouseId;
  96. data['dosage'] = this.dosage;
  97. data['quantity'] = this.quantity;
  98. data['tbEquipmentOfCustomerId'] = this.tbEquipmentOfCustomerId;
  99. data['howToUse'] = this.howToUse;
  100. return data;
  101. }
  102. }