mix_model.dart 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  1. class MixModel {
  2. List<Records> records;
  3. int total;
  4. int size;
  5. int current;
  6. bool searchCount;
  7. int pages;
  8. MixModel(
  9. {this.records,
  10. this.total,
  11. this.size,
  12. this.current,
  13. this.searchCount,
  14. this.pages});
  15. MixModel.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 uid;
  44. int createTime;
  45. String createBy;
  46. int updateTime;
  47. String updateBy;
  48. String title;
  49. String expression;
  50. String solution;
  51. String imgs;
  52. int brandId;
  53. int expert;
  54. double reward;
  55. int lockFlag;
  56. int hotFlag;
  57. int statuz;
  58. int favoriteNum;
  59. int likeNum;
  60. int browseNum;
  61. int tipNum;
  62. int examineFlag;
  63. String notExamineReason;
  64. int validPeriod;
  65. String userName;
  66. String brandName;
  67. String avatarUrl;
  68. int isLike;
  69. int isFavorite;
  70. String descr;
  71. String cover;
  72. String url;
  73. String userId;
  74. int payNum;
  75. int checkFlag;
  76. String checkComment;
  77. int platformFlag;
  78. String nickname;
  79. int favoriteId;
  80. int likeId;
  81. String job;
  82. double upperSalary;
  83. double lowerSalary;
  84. int upperWorking;
  85. int lowerWorking;
  86. int eduLevel;
  87. String address;
  88. int companyId;
  89. String info;
  90. int sort;
  91. String reason;
  92. String typeName;
  93. String eduName;
  94. Company company;
  95. int isApply;
  96. String name;
  97. double price;
  98. double discountPrice;
  99. String manufacturer;
  100. String telephone;
  101. String bname;
  102. String provinceName;
  103. String cityName;
  104. String companyName;
  105. Records({
  106. this.id,
  107. this.uid,
  108. this.createTime,
  109. this.createBy,
  110. this.updateTime,
  111. this.updateBy,
  112. this.title,
  113. this.expression,
  114. this.solution,
  115. this.imgs,
  116. this.brandId,
  117. this.expert,
  118. this.reward,
  119. this.lockFlag,
  120. this.hotFlag,
  121. this.statuz,
  122. this.favoriteNum,
  123. this.likeNum,
  124. this.browseNum,
  125. this.tipNum,
  126. this.examineFlag,
  127. this.notExamineReason,
  128. this.validPeriod,
  129. this.userName,
  130. this.brandName,
  131. this.avatarUrl,
  132. this.isLike,
  133. this.isFavorite,
  134. this.descr,
  135. this.cover,
  136. this.url,
  137. this.userId,
  138. this.payNum,
  139. this.checkFlag,
  140. this.checkComment,
  141. this.platformFlag,
  142. this.nickname,
  143. this.favoriteId,
  144. this.likeId,
  145. this.job,
  146. this.upperSalary,
  147. this.lowerSalary,
  148. this.upperWorking,
  149. this.lowerWorking,
  150. this.eduLevel,
  151. this.address,
  152. this.companyId,
  153. this.info,
  154. this.sort,
  155. this.reason,
  156. this.typeName,
  157. this.eduName,
  158. this.company,
  159. this.isApply,
  160. this.name,
  161. this.price,
  162. this.discountPrice,
  163. this.manufacturer,
  164. this.telephone,
  165. this.bname,
  166. this.provinceName,
  167. this.cityName,
  168. this.companyName,
  169. // this.sname,
  170. });
  171. Records.fromJson(Map<String, dynamic> json) {
  172. id = json['id'];
  173. name = json['name'] !=null ? json['name'] : json['sname'];
  174. brandName =json['brandName'] !=null?json['brandName']:json['bname'];
  175. uid = json['uid'];
  176. createTime = json['createTime'];
  177. createBy = json['createBy'];
  178. updateTime = json['updateTime'];
  179. updateBy = json['updateBy'];
  180. title = json['title'];
  181. expression = json['expression'];
  182. solution = json['solution'];
  183. imgs = json['imgs'];
  184. brandId = json['brandId'];
  185. expert = json['expert'];
  186. reward = json['reward'];
  187. lockFlag = json['lockFlag'];
  188. hotFlag = json['hotFlag'];
  189. statuz = json['statuz'];
  190. favoriteNum = json['favoriteNum'];
  191. likeNum = json['likeNum'];
  192. browseNum = json['browseNum'];
  193. tipNum = json['tipNum'];
  194. examineFlag = json['examineFlag'];
  195. notExamineReason = json['notExamineReason'];
  196. validPeriod = json['validPeriod'];
  197. userName = json['userName'];
  198. avatarUrl = json['avatarUrl'];
  199. isLike = json['isLike'];
  200. isFavorite = json['isFavorite'];
  201. descr = json['descr'];
  202. cover = json['cover'];
  203. url = json['url'];
  204. userId = json['userId'];
  205. payNum = json['payNum'];
  206. checkFlag = json['checkFlag'];
  207. checkComment = json['checkComment'];
  208. platformFlag = json['platformFlag'];
  209. nickname = json['nickname'];
  210. favoriteId = json['favoriteId'];
  211. likeId = json['likeId'];
  212. job = json['job'];
  213. upperSalary = json['upperSalary'];
  214. lowerSalary = json['lowerSalary'];
  215. upperWorking = json['upperWorking'];
  216. lowerWorking = json['lowerWorking'];
  217. eduLevel = json['eduLevel'];
  218. address = json['address'];
  219. companyId = json['companyId'];
  220. info = json['info'];
  221. sort = json['sort'];
  222. reason = json['reason'];
  223. typeName = json['typeName'];
  224. eduName = json['eduName'];
  225. company =
  226. json['company'] != null ? new Company.fromJson(json['company']) : null;
  227. isApply = json['isApply'];
  228. // name = json['name'];
  229. price = json['price'];
  230. discountPrice = json['discountPrice'];
  231. manufacturer = json['manufacturer'];
  232. telephone = json['telephone'];
  233. bname = json['bname'];
  234. provinceName = json['provinceName'];
  235. cityName = json['cityName'];
  236. companyName = json['companyName'];
  237. }
  238. Map<String, dynamic> toJson() {
  239. final Map<String, dynamic> data = new Map<String, dynamic>();
  240. data['companyName'] = this.companyName;
  241. data['id'] = this.id;
  242. data['uid'] = this.uid;
  243. data['createTime'] = this.createTime;
  244. data['createBy'] = this.createBy;
  245. data['updateTime'] = this.updateTime;
  246. data['updateBy'] = this.updateBy;
  247. data['title'] = this.title;
  248. data['expression'] = this.expression;
  249. data['solution'] = this.solution;
  250. data['imgs'] = this.imgs;
  251. data['brandId'] = this.brandId;
  252. data['expert'] = this.expert;
  253. data['reward'] = this.reward;
  254. data['lockFlag'] = this.lockFlag;
  255. data['hotFlag'] = this.hotFlag;
  256. data['statuz'] = this.statuz;
  257. data['favoriteNum'] = this.favoriteNum;
  258. data['likeNum'] = this.likeNum;
  259. data['browseNum'] = this.browseNum;
  260. data['tipNum'] = this.tipNum;
  261. data['examineFlag'] = this.examineFlag;
  262. data['notExamineReason'] = this.notExamineReason;
  263. data['validPeriod'] = this.validPeriod;
  264. data['userName'] = this.userName;
  265. data['brandName'] = this.brandName;
  266. data['avatarUrl'] = this.avatarUrl;
  267. data['isLike'] = this.isLike;
  268. data['isFavorite'] = this.isFavorite;
  269. data['descr'] = this.descr;
  270. data['cover'] = this.cover;
  271. data['url'] = this.url;
  272. data['userId'] = this.userId;
  273. data['payNum'] = this.payNum;
  274. data['checkFlag'] = this.checkFlag;
  275. data['checkComment'] = this.checkComment;
  276. data['platformFlag'] = this.platformFlag;
  277. data['nickname'] = this.nickname;
  278. data['favoriteId'] = this.favoriteId;
  279. data['likeId'] = this.likeId;
  280. data['job'] = this.job;
  281. data['upperSalary'] = this.upperSalary;
  282. data['lowerSalary'] = this.lowerSalary;
  283. data['upperWorking'] = this.upperWorking;
  284. data['lowerWorking'] = this.lowerWorking;
  285. data['eduLevel'] = this.eduLevel;
  286. data['address'] = this.address;
  287. data['companyId'] = this.companyId;
  288. data['info'] = this.info;
  289. data['sort'] = this.sort;
  290. data['reason'] = this.reason;
  291. data['typeName'] = this.typeName;
  292. data['eduName'] = this.eduName;
  293. if (this.company != null) {
  294. data['company'] = this.company.toJson();
  295. }
  296. data['isApply'] = this.isApply;
  297. data['name'] = this.name;
  298. data['price'] = this.price;
  299. data['discountPrice'] = this.discountPrice;
  300. data['manufacturer'] = this.manufacturer;
  301. data['telephone'] = this.telephone;
  302. data['bname'] = this.bname;
  303. data['provinceName'] = this.provinceName;
  304. data['cityName'] = this.cityName;
  305. // data['sname'] = this.sname;
  306. return data;
  307. }
  308. }
  309. class Company {
  310. int id;
  311. int createTime;
  312. String createBy;
  313. int updateTime;
  314. String updateBy;
  315. String name;
  316. String address;
  317. String corporator;
  318. String telephone;
  319. String mainbusiness;
  320. int type;
  321. String companySize;
  322. int top_flag;
  323. Company(
  324. {this.id,
  325. this.createTime,
  326. this.createBy,
  327. this.updateTime,
  328. this.updateBy,
  329. this.name,
  330. this.address,
  331. this.corporator,
  332. this.telephone,
  333. this.mainbusiness,
  334. this.type,
  335. this.companySize,
  336. this.top_flag});
  337. Company.fromJson(Map<String, dynamic> json) {
  338. id = json['id'];
  339. createTime = json['createTime'];
  340. createBy = json['createBy'];
  341. updateTime = json['updateTime'];
  342. updateBy = json['updateBy'];
  343. name = json['name'];
  344. address = json['address'];
  345. corporator = json['corporator'];
  346. telephone = json['telephone'];
  347. mainbusiness = json['mainbusiness'];
  348. type = json['type'];
  349. companySize = json['companySize'];
  350. }
  351. Map<String, dynamic> toJson() {
  352. final Map<String, dynamic> data = new Map<String, dynamic>();
  353. data['id'] = this.id;
  354. data['createTime'] = this.createTime;
  355. data['createBy'] = this.createBy;
  356. data['updateTime'] = this.updateTime;
  357. data['updateBy'] = this.updateBy;
  358. data['name'] = this.name;
  359. data['address'] = this.address;
  360. data['corporator'] = this.corporator;
  361. data['telephone'] = this.telephone;
  362. data['mainbusiness'] = this.mainbusiness;
  363. data['type'] = this.type;
  364. data['companySize'] = this.companySize;
  365. return data;
  366. }
  367. }