piao_tou_model.dart 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. class PiaoTouModel {
  2. List<Records> records;
  3. int total;
  4. int size;
  5. int current;
  6. bool searchCount;
  7. int pages;
  8. PiaoTouModel(
  9. {this.records,
  10. this.total,
  11. this.size,
  12. this.current,
  13. this.searchCount,
  14. this.pages});
  15. PiaoTouModel.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. int type;
  48. String name;
  49. String telephone;
  50. String email;
  51. String gmfNsrsbm;
  52. String gmfMc;
  53. String gmfDz;
  54. String gmfDh;
  55. String gmfYh;
  56. String gmfZh;
  57. String userId;
  58. int isDefault;
  59. String enterpriseNumber;
  60. Records(
  61. {this.id,
  62. this.createTime,
  63. this.createBy,
  64. this.updateTime,
  65. this.updateBy,
  66. this.type,
  67. this.name,
  68. this.telephone,
  69. this.email,
  70. this.gmfNsrsbm,
  71. this.gmfMc,
  72. this.gmfDz,
  73. this.gmfDh,
  74. this.gmfYh,
  75. this.gmfZh,
  76. this.isDefault,
  77. this.userId,
  78. this.enterpriseNumber});
  79. Records.fromJson(Map<String, dynamic> json) {
  80. id = json['id'];
  81. createTime = json['createTime'];
  82. createBy = json['createBy'];
  83. updateTime = json['updateTime'];
  84. updateBy = json['updateBy'];
  85. type = json['type'];
  86. name = json['name'];
  87. telephone = json['telephone'];
  88. email = json['email'];
  89. gmfNsrsbm = json['gmfNsrsbm'];
  90. gmfMc = json['gmfMc'];
  91. gmfDz = json['gmfDz'];
  92. gmfDh = json['gmfDh'];
  93. gmfYh = json['gmfYh'];
  94. gmfZh = json['gmfZh'];
  95. isDefault = json['isDefault'];
  96. userId = json['userId'];
  97. enterpriseNumber = json['enterpriseNumber'];
  98. }
  99. Map<String, dynamic> toJson() {
  100. final Map<String, dynamic> data = new Map<String, dynamic>();
  101. data['id'] = this.id;
  102. data['createTime'] = this.createTime;
  103. data['createBy'] = this.createBy;
  104. data['updateTime'] = this.updateTime;
  105. data['updateBy'] = this.updateBy;
  106. data['type'] = this.type;
  107. data['name'] = this.name;
  108. data['telephone'] = this.telephone;
  109. data['email'] = this.email;
  110. data['gmfNsrsbm'] = this.gmfNsrsbm;
  111. data['gmfMc'] = this.gmfMc;
  112. data['gmfDz'] = this.gmfDz;
  113. data['gmfDh'] = this.gmfDh;
  114. data['gmfYh'] = this.gmfYh;
  115. data['gmfZh'] = this.gmfZh;
  116. data['isDefault'] = this.isDefault;
  117. data['userId'] = this.userId;
  118. data['enterpriseNumber'] = this.enterpriseNumber;
  119. return data;
  120. }
  121. }