punishments_model.dart 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. }