punishments_model.dart 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. class PunishmentsModel {
  2. List<Records> records;
  3. int total;
  4. int size;
  5. int current;
  6. bool searchCount;
  7. int pages;
  8. PunishmentsModel(
  9. {this.records,
  10. this.total,
  11. this.size,
  12. this.current,
  13. this.searchCount,
  14. this.pages});
  15. PunishmentsModel.fromJson(Map<String, dynamic> json) {
  16. if (json['records'] != null) {
  17. records = new List<Records>();
  18. json['records'].forEach((v) {
  19. records.add(new Records.fromJson(v));
  20. });
  21. }
  22. total = json['total'];
  23. size = json['size'];
  24. current = json['current'];
  25. searchCount = json['searchCount'];
  26. pages = json['pages'];
  27. }
  28. Map<String, dynamic> toJson() {
  29. final Map<String, dynamic> data = new Map<String, dynamic>();
  30. if (this.records != null) {
  31. data['records'] = this.records.map((v) => v.toJson()).toList();
  32. }
  33. data['total'] = this.total;
  34. data['size'] = this.size;
  35. data['current'] = this.current;
  36. data['searchCount'] = this.searchCount;
  37. data['pages'] = this.pages;
  38. return data;
  39. }
  40. }
  41. class Records {
  42. int id;
  43. int createTime;
  44. String createBy;
  45. int updateTime;
  46. String updateBy;
  47. String chargeId;
  48. String title;
  49. String des;
  50. String picUrl;
  51. double punishAmount;
  52. int statuz;
  53. Records(
  54. {this.id,
  55. this.createTime,
  56. this.createBy,
  57. this.updateTime,
  58. this.updateBy,
  59. this.chargeId,
  60. this.title,
  61. this.des,
  62. this.picUrl,
  63. this.punishAmount,
  64. this.statuz});
  65. Records.fromJson(Map<String, dynamic> json) {
  66. id = json['id'];
  67. createTime = json['createTime'];
  68. createBy = json['createBy'];
  69. updateTime = json['updateTime'];
  70. updateBy = json['updateBy'];
  71. chargeId = json['chargeId'];
  72. title = json['title'];
  73. des = json['des'];
  74. picUrl = json['picUrl'];
  75. punishAmount = json['punishAmount'];
  76. statuz = json['statuz'];
  77. }
  78. Map<String, dynamic> toJson() {
  79. final Map<String, dynamic> data = new Map<String, dynamic>();
  80. data['id'] = this.id;
  81. data['createTime'] = this.createTime;
  82. data['createBy'] = this.createBy;
  83. data['updateTime'] = this.updateTime;
  84. data['updateBy'] = this.updateBy;
  85. data['chargeId'] = this.chargeId;
  86. data['title'] = this.title;
  87. data['des'] = this.des;
  88. data['picUrl'] = this.picUrl;
  89. data['punishAmount'] = this.punishAmount;
  90. data['statuz'] = this.statuz;
  91. return data;
  92. }
  93. }
  94. // {"id":112,"userId":1001101100368,"targetUserName":"电梯学堂-电梯管家-小天","targetUserId":10000,"targetAvatarUrl":"http://ty-oss-file.oss-cn-hangzhou.aliyuncs.com/2020/07/24/1286557548035469313.jpg","amount":0.01,"createTime":1608905887000}
  95. class RewardRecordModel {
  96. List<ExpertsRewardRecordModel> records;
  97. int total;
  98. int size;
  99. int current;
  100. bool searchCount;
  101. int pages;
  102. RewardRecordModel(
  103. {this.records,
  104. this.total,
  105. this.size,
  106. this.current,
  107. this.searchCount,
  108. this.pages});
  109. RewardRecordModel.fromJson(Map<String, dynamic> json) {
  110. if (json['records'] != null) {
  111. records = new List<ExpertsRewardRecordModel>();
  112. json['records'].forEach((v) {
  113. records.add(new ExpertsRewardRecordModel.fromJson(v));
  114. });
  115. }
  116. total = json['total'];
  117. size = json['size'];
  118. current = json['current'];
  119. searchCount = json['searchCount'];
  120. pages = json['pages'];
  121. }
  122. Map<String, dynamic> toJson() {
  123. final Map<String, dynamic> data = new Map<String, dynamic>();
  124. if (this.records != null) {
  125. data['records'] = this.records.map((v) => v.toJson()).toList();
  126. }
  127. data['total'] = this.total;
  128. data['size'] = this.size;
  129. data['current'] = this.current;
  130. data['searchCount'] = this.searchCount;
  131. data['pages'] = this.pages;
  132. return data;
  133. }
  134. }
  135. class ExpertsRewardRecordModel {
  136. int id;
  137. double amount;
  138. String targetUserName;
  139. String targetAvatarUrl;
  140. int createTime;
  141. ExpertsRewardRecordModel({
  142. this.id,
  143. this.createTime,
  144. this.amount,
  145. this.targetUserName,
  146. this.targetAvatarUrl,
  147. });
  148. ExpertsRewardRecordModel.fromJson(Map<String, dynamic> json) {
  149. id = json['id'];
  150. createTime = json['createTime'];
  151. amount = json['amount'];
  152. targetUserName = json['targetUserName'];
  153. targetAvatarUrl = json['targetAvatarUrl'];
  154. }
  155. Map<String, dynamic> toJson() {
  156. final Map<String, dynamic> data = new Map<String, dynamic>();
  157. data['id'] = this.id;
  158. data['createTime'] = this.createTime;
  159. data['amount'] = this.amount;
  160. data['targetUserName'] = this.targetUserName;
  161. data['targetAvatarUrl'] = this.targetAvatarUrl;
  162. return data;
  163. }
  164. }