file_categorys_tree.dart 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. class FileCategorysTreeModel {
  2. int id;
  3. int createTime;
  4. String createBy;
  5. int updateTime;
  6. String updateBy;
  7. int pid;
  8. String name;
  9. int brandId;
  10. String icon;
  11. String descr;
  12. int statuz;
  13. String sort;
  14. String pidName;
  15. String brandName;
  16. List<FileCategorysModel> chilList;
  17. FileCategorysTreeModel(
  18. {this.id,
  19. this.createTime,
  20. this.createBy,
  21. this.updateTime,
  22. this.updateBy,
  23. this.pid,
  24. this.name,
  25. this.brandId,
  26. this.icon,
  27. this.descr,
  28. this.statuz,
  29. this.sort,
  30. this.pidName,
  31. this.brandName,
  32. this.chilList});
  33. FileCategorysTreeModel.fromJson(Map<String, dynamic> json) {
  34. id = json['id'];
  35. createTime = json['createTime'];
  36. createBy = json['createBy'];
  37. updateTime = json['updateTime'];
  38. updateBy = json['updateBy'];
  39. pid = json['pid'];
  40. name = json['name'];
  41. brandId = json['brandId'];
  42. icon = json['icon'];
  43. descr = json['descr'];
  44. statuz = json['statuz'];
  45. sort = json['sort'];
  46. pidName = json['pidName'];
  47. brandName = json['brandName'];
  48. if (json['chilList'] != null) {
  49. chilList = new List<FileCategorysModel>();
  50. json['chilList'].forEach((v) {
  51. chilList.add(new FileCategorysModel.fromJson(v));
  52. });
  53. }
  54. }
  55. Map<String, dynamic> toJson() {
  56. final Map<String, dynamic> data = new Map<String, dynamic>();
  57. data['id'] = this.id;
  58. data['createTime'] = this.createTime;
  59. data['createBy'] = this.createBy;
  60. data['updateTime'] = this.updateTime;
  61. data['updateBy'] = this.updateBy;
  62. data['pid'] = this.pid;
  63. data['name'] = this.name;
  64. data['brandId'] = this.brandId;
  65. data['icon'] = this.icon;
  66. data['descr'] = this.descr;
  67. data['statuz'] = this.statuz;
  68. data['sort'] = this.sort;
  69. data['pidName'] = this.pidName;
  70. data['brandName'] = this.brandName;
  71. if (this.chilList != null) {
  72. data['chilList'] = this.chilList.map((v) => v.toJson()).toList();
  73. }
  74. return data;
  75. }
  76. }
  77. class FileCategorysModel {
  78. int id;
  79. int createTime;
  80. String createBy;
  81. int updateTime;
  82. String updateBy;
  83. int pid;
  84. String name;
  85. int brandId;
  86. String icon;
  87. String descr;
  88. int statuz;
  89. String sort;
  90. String pidName;
  91. String brandName;
  92. FileCategorysModel(
  93. {this.id,
  94. this.createTime,
  95. this.createBy,
  96. this.updateTime,
  97. this.updateBy,
  98. this.pid,
  99. this.name,
  100. this.brandId,
  101. this.icon,
  102. this.descr,
  103. this.statuz,
  104. this.sort,
  105. this.pidName,
  106. this.brandName});
  107. FileCategorysModel.fromJson(Map<String, dynamic> json) {
  108. id = json['id'];
  109. createTime = json['createTime'];
  110. createBy = json['createBy'];
  111. updateTime = json['updateTime'];
  112. updateBy = json['updateBy'];
  113. pid = json['pid'];
  114. name = json['name'];
  115. brandId = json['brandId'];
  116. icon = json['icon'];
  117. descr = json['descr'];
  118. statuz = json['statuz'];
  119. sort = json['sort'];
  120. pidName = json['pidName'];
  121. brandName = json['brandName'];
  122. }
  123. Map<String, dynamic> toJson() {
  124. final Map<String, dynamic> data = new Map<String, dynamic>();
  125. data['id'] = this.id;
  126. data['createTime'] = this.createTime;
  127. data['createBy'] = this.createBy;
  128. data['updateTime'] = this.updateTime;
  129. data['updateBy'] = this.updateBy;
  130. data['pid'] = this.pid;
  131. data['name'] = this.name;
  132. data['brandId'] = this.brandId;
  133. data['icon'] = this.icon;
  134. data['descr'] = this.descr;
  135. data['statuz'] = this.statuz;
  136. data['sort'] = this.sort;
  137. data['pidName'] = this.pidName;
  138. data['brandName'] = this.brandName;
  139. return data;
  140. }
  141. }