models.dart 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  1. //登录
  2. class Login {
  3. bool success;
  4. int code;
  5. String msg;
  6. LoginMap data;
  7. Login({
  8. this.success,
  9. this.code,
  10. this.msg,
  11. this.data
  12. });
  13. factory Login.fromJson(Map < String, dynamic > json) {
  14. LoginMap tempData = LoginMap.fromJson(json['data']);
  15. return Login(
  16. success: json['success'],
  17. code: json['code'],
  18. msg: json['msg'],
  19. data: tempData
  20. );
  21. }
  22. }
  23. class LoginMap {
  24. String avatarUrl;
  25. String nickName;
  26. int roleType;
  27. String userId;
  28. int status;
  29. String token;
  30. LoginMap({
  31. this.userId,
  32. this.avatarUrl,
  33. this.nickName,
  34. this.roleType,
  35. this.status,
  36. this.token
  37. });
  38. factory LoginMap.fromJson(Map < String, dynamic > json) {
  39. return LoginMap(
  40. avatarUrl: json['avatarUrl'],
  41. nickName: json['nickName'],
  42. roleType: json['roleType'],
  43. userId: json['userId'],
  44. status: json['status'],
  45. token: json['token'],
  46. );
  47. }
  48. }
  49. //接单页列表
  50. class OrderListObj {
  51. bool success;
  52. int code;
  53. String msg;
  54. OrderListData data;
  55. OrderListObj({
  56. this.success,
  57. this.code,
  58. this.msg,
  59. this.data
  60. });
  61. factory OrderListObj.fromJson(Map < String, dynamic > json) {
  62. return OrderListObj(
  63. success: json['success'],
  64. code: json['code'],
  65. msg: json['msg'],
  66. data: OrderListData.fromJson(json['data'])
  67. );
  68. }
  69. }
  70. class OrderListData {
  71. bool hasNextPage;
  72. List < OrderList > items;
  73. int limit;
  74. int page;
  75. int totalCount;
  76. int totalPage;
  77. OrderListData({
  78. this.hasNextPage,
  79. this.items,
  80. this.limit,
  81. this.page,
  82. this.totalCount,
  83. this.totalPage
  84. });
  85. factory OrderListData.fromJson(Map < String, dynamic > json) {
  86. List list = json['items'] as List;
  87. List < OrderList > tempOrderList = list.map((i) => OrderList.fromJson(i)).toList();
  88. return OrderListData(
  89. hasNextPage: json['hasNextPage'],
  90. items: tempOrderList,
  91. limit: json['limit'],
  92. page: json['page'],
  93. totalCount: json['totalCount'],
  94. totalPage: json['totalPage']
  95. );
  96. }
  97. }
  98. class OrderList {
  99. String orderNo;
  100. int createTime;
  101. String goods;
  102. int goodsQuantity;
  103. String receiptCompanyAddress;
  104. String receiptCompanyName;
  105. String receiptCompanyPhone;
  106. String sendCompanyAddress;
  107. String sendCompanyName;
  108. String sendCompanyPhone;
  109. OrderList({
  110. this.orderNo,
  111. this.createTime,
  112. this.goods,
  113. this.goodsQuantity,
  114. this.receiptCompanyAddress,
  115. this.receiptCompanyName,
  116. this.receiptCompanyPhone,
  117. this.sendCompanyAddress,
  118. this.sendCompanyName,
  119. this.sendCompanyPhone
  120. });
  121. factory OrderList.fromJson(Map < String, dynamic > json) {
  122. return OrderList(
  123. orderNo: json['orderNo'],
  124. createTime: json['createTime'],
  125. goods: json['goods'],
  126. goodsQuantity: json['goodsQuantity'],
  127. receiptCompanyAddress: json['receiptCompanyAddress'],
  128. receiptCompanyName: json['receiptCompanyName'],
  129. receiptCompanyPhone: json['receiptCompanyPhone'],
  130. sendCompanyAddress: json['sendCompanyAddress'],
  131. sendCompanyName: json['sendCompanyName'],
  132. sendCompanyPhone: json['sendCompanyPhone']
  133. );
  134. }
  135. }
  136. //获取站点
  137. class Station {
  138. bool success;
  139. int code;
  140. String msg;
  141. List < StationList > data;
  142. Station({
  143. this.success,
  144. this.code,
  145. this.msg,
  146. this.data
  147. });
  148. factory Station.fromJson(Map < String, dynamic > json) {
  149. List list = json['data'] as List;
  150. print(list.toString());
  151. List < StationList > tempList = list.map((i) => StationList.fromJson(i)).toList();
  152. return Station(
  153. success: json['success'],
  154. code: json['code'],
  155. msg: json['msg'],
  156. data: tempList
  157. );
  158. }
  159. }
  160. class StationList {
  161. String code;
  162. int id;
  163. String name;
  164. int stationStatus;
  165. int status;
  166. StationList({
  167. this.code,
  168. this.id,
  169. this.name,
  170. this.stationStatus,
  171. this.status
  172. });
  173. factory StationList.fromJson(Map < String, dynamic > json) {
  174. return StationList(
  175. code: json['code'],
  176. id: json['id'],
  177. name: json['name'],
  178. stationStatus: json['stationStatus'],
  179. status: json['status']
  180. );
  181. }
  182. }
  183. //站点线路
  184. class StationLine {
  185. bool success;
  186. int code;
  187. String msg;
  188. List < LineObj > data;
  189. StationLine({
  190. this.success,
  191. this.code,
  192. this.msg,
  193. this.data
  194. });
  195. factory StationLine.fromJson(Map < String, dynamic > json) {
  196. var list = json['data'] as List;
  197. List < LineObj > tempList = list.map((i) => LineObj.fromJson(i)).toList();
  198. return StationLine(
  199. success: json['success'],
  200. code: json['code'],
  201. msg: json['msg'],
  202. data: tempList
  203. );
  204. }
  205. }
  206. class LineObj {
  207. String code;
  208. int id;
  209. String name;
  210. LineObj({
  211. this.code,
  212. this.name,
  213. this.id
  214. });
  215. factory LineObj.fromJson(Map < String, dynamic > json) {
  216. return LineObj(
  217. code: json['code'],
  218. id: json['id'],
  219. name: json['name']
  220. );
  221. }
  222. }
  223. //修改密码
  224. class UpdataPasswrod {
  225. bool success;
  226. int code;
  227. String msg;
  228. String data;
  229. UpdataPasswrod({
  230. this.success,
  231. this.code,
  232. this.msg,
  233. this.data
  234. });
  235. factory UpdataPasswrod.fromJson(Map < String, dynamic > json) {
  236. return UpdataPasswrod(
  237. success: json['success'],
  238. code: json['code'],
  239. msg: json['msg'],
  240. data: json['data']
  241. );
  242. }
  243. }
  244. //手机号模糊匹配
  245. class LikePhone{
  246. bool success;
  247. int code;
  248. String msg;
  249. List<LikePhoneList> data;
  250. LikePhone({
  251. this.success,
  252. this.code,
  253. this.msg,
  254. this.data
  255. });
  256. factory LikePhone.fromJson(Map<String,dynamic> json){
  257. List list = json['data'] as List;
  258. List<LikePhoneList> tempList = list.map((i) => LikePhoneList.fromJson(i)).toList();
  259. return LikePhone(
  260. success: json['success'],
  261. code: json['code'],
  262. msg:json['msg'],
  263. data:tempList
  264. );
  265. }
  266. }
  267. class LikePhoneList{
  268. String address;
  269. String areaCode;
  270. String areaName;
  271. String cityCode;
  272. String cityName;
  273. String companyCode;
  274. String companyName;
  275. String companyPhone;
  276. int id;
  277. String provinceCode;
  278. String provinceName;
  279. String uzerPhone;
  280. LikePhoneList({
  281. this.address,
  282. this.areaCode,
  283. this.areaName,
  284. this.cityCode,
  285. this.cityName,
  286. this.companyCode,
  287. this.companyName,
  288. this.companyPhone,
  289. this.id,
  290. this.provinceCode,
  291. this.provinceName,
  292. this.uzerPhone
  293. });
  294. factory LikePhoneList.fromJson(Map<String,dynamic> json){
  295. return LikePhoneList(
  296. address:json['address'],
  297. areaCode:json['areaCode'],
  298. areaName:json['areaName'],
  299. cityCode:json['cityCode'],
  300. cityName:json['cityName'],
  301. companyCode:json['companyCode'],
  302. companyName:json['companyName'],
  303. companyPhone:json['companyPhone'],
  304. id:json['id'],
  305. provinceCode:json['provinceCode'],
  306. provinceName:json['provinceName'],
  307. uzerPhone:json['uzerPhone']
  308. );
  309. }
  310. }
  311. //商品类别列表
  312. class GoodsCategory{
  313. bool success;
  314. int code;
  315. String msg;
  316. List<GoodCategoryList> data;
  317. GoodsCategory({
  318. this.success,
  319. this.code,
  320. this.msg,
  321. this.data
  322. });
  323. factory GoodsCategory.fromJson(Map<String,dynamic> json){
  324. List list = json['data'] as List;
  325. List<GoodCategoryList> tempList = list.map((i) => GoodCategoryList.fromJson(i)).toList();
  326. return GoodsCategory(
  327. success: json['success'],
  328. code:json['code'],
  329. msg:json['msg'],
  330. data:tempList
  331. );
  332. }
  333. }
  334. class GoodCategoryList{
  335. int id;
  336. String name;
  337. GoodCategoryList({
  338. this.id,
  339. this.name
  340. });
  341. factory GoodCategoryList.fromJson(Map<String,dynamic> json){
  342. return GoodCategoryList(
  343. id:json['id'],
  344. name:json['name']
  345. );
  346. }
  347. }
  348. //商品包装类别列表
  349. class GoodsPackage{
  350. bool success;
  351. int code;
  352. String msg;
  353. List<GoodsPackageList> data;
  354. GoodsPackage({
  355. this.success,
  356. this.code,
  357. this.msg,
  358. this.data
  359. });
  360. factory GoodsPackage.fromJson(Map<String,dynamic> json){
  361. List list = json['data'] as List;
  362. List<GoodsPackageList> tempList = list.map((i) => GoodsPackageList.fromJson(i)).toList();
  363. return GoodsPackage(
  364. success: json['success'],
  365. code:json['code'],
  366. msg:json['msg'],
  367. data:tempList
  368. );
  369. }
  370. }
  371. class GoodsPackageList{
  372. int id;
  373. String name;
  374. GoodsPackageList({
  375. this.id,
  376. this.name
  377. });
  378. factory GoodsPackageList.fromJson(Map<String,dynamic> json){
  379. return GoodsPackageList(
  380. id:json['id'],
  381. name: json['name']
  382. );
  383. }
  384. }
  385. //创建订单
  386. class CreateOrder{
  387. bool success;
  388. int code;
  389. String msg;
  390. CreateOrder({
  391. this.success,
  392. this.code,
  393. this.msg
  394. });
  395. factory CreateOrder.fromJson(Map<String,dynamic> json){
  396. return CreateOrder(
  397. success: json['success'],
  398. code: json['code'],
  399. msg:json['msg']
  400. );
  401. }
  402. }