error_model.dart 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. class ErrorModel {
  2. List<ErrorDetailModel> records;
  3. int total;
  4. int size;
  5. int current;
  6. bool searchCount;
  7. int pages;
  8. ErrorModel(
  9. {this.records,
  10. this.total,
  11. this.size,
  12. this.current,
  13. this.searchCount,
  14. this.pages});
  15. ErrorModel.fromJson(Map<String, dynamic> json) {
  16. if (json['records'] != null) {
  17. records = new List<ErrorDetailModel>();
  18. json['records'].forEach((v) {
  19. records.add(new ErrorDetailModel.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 ErrorDetailModel {
  42. int id;
  43. int createTime;
  44. String createBy;
  45. int updateTime;
  46. String updateBy;
  47. int brandId;
  48. String code;
  49. String descr;
  50. String cause;
  51. String recoveryMethod;
  52. String imgs;
  53. int sort;
  54. int topFlag;
  55. int statuz;
  56. ErrorDetailModel(
  57. {this.id,
  58. this.createTime,
  59. this.createBy,
  60. this.updateTime,
  61. this.updateBy,
  62. this.brandId,
  63. this.code,
  64. this.descr,
  65. this.cause,
  66. this.recoveryMethod,
  67. this.imgs,
  68. this.sort,
  69. this.topFlag,
  70. this.statuz});
  71. ErrorDetailModel.fromJson(Map<String, dynamic> json) {
  72. id = json['id'];
  73. createTime = json['createTime'];
  74. createBy = json['createBy'];
  75. updateTime = json['updateTime'];
  76. updateBy = json['updateBy'];
  77. brandId = json['brandId'];
  78. code = json['code'];
  79. descr = json['descr'];
  80. cause = json['cause'];
  81. recoveryMethod = json['recoveryMethod'];
  82. imgs = json['imgs'];
  83. sort = json['sort'];
  84. topFlag = json['topFlag'];
  85. statuz = json['statuz'];
  86. }
  87. Map<String, dynamic> toJson() {
  88. final Map<String, dynamic> data = new Map<String, dynamic>();
  89. data['id'] = this.id;
  90. data['createTime'] = this.createTime;
  91. data['createBy'] = this.createBy;
  92. data['updateTime'] = this.updateTime;
  93. data['updateBy'] = this.updateBy;
  94. data['brandId'] = this.brandId;
  95. data['code'] = this.code;
  96. data['descr'] = this.descr;
  97. data['cause'] = this.cause;
  98. data['recoveryMethod'] = this.recoveryMethod;
  99. data['imgs'] = this.imgs;
  100. data['sort'] = this.sort;
  101. data['topFlag'] = this.topFlag;
  102. data['statuz'] = this.statuz;
  103. return data;
  104. }
  105. }