models.dart 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752
  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. String orderNo;
  391. CreateOrder({
  392. this.success,
  393. this.code,
  394. this.msg,
  395. this.orderNo
  396. });
  397. factory CreateOrder.fromJson(Map < String, dynamic > json) {
  398. return CreateOrder(
  399. success: json['success'],
  400. code: json['code'],
  401. msg: json['msg'],
  402. orderNo: json['data']['orderNo']
  403. );
  404. }
  405. }
  406. //订单详情
  407. class OrderDetailObj {
  408. bool success;
  409. int code;
  410. String msg;
  411. OrderDetailData data;
  412. OrderDetailObj({
  413. this.success,
  414. this.code,
  415. this.msg,
  416. this.data,
  417. });
  418. factory OrderDetailObj.fromJson(Map < String, dynamic > json) {
  419. OrderDetailData tempData = OrderDetailData.fromJson(json['data']);
  420. return OrderDetailObj(
  421. success: json['success'],
  422. code: json['code'],
  423. msg: json['msg'],
  424. data: tempData
  425. );
  426. }
  427. }
  428. class OrderDetailData {
  429. String orderNo;
  430. String goods; //商品名称
  431. int goodsAgencyFund; //代收款
  432. int goodsFlatCost; //工本费
  433. int goodsFreight; //运费
  434. int goodsInsurance; //商品保险费
  435. int goodsOtherFees; //其他费用
  436. int goodsPriceProtection; //商品保价
  437. int goodsQuantity; //商品数量
  438. int goodsValue; //商品价值
  439. double goodsWeight; //商品重量
  440. int id; //订单Id
  441. String memo; //备注
  442. int orderStatus; //订单状态 0:代收单,1:已接单,2:配送中,3:已签收,4:拒收
  443. String receiptCompanyAddress; //收件详细地址
  444. String receiptCompanyAreaCode; //收件区码
  445. String receiptCompanyAreaName; //收件区名
  446. String receiptCompanyBankCard; //收件银行卡号
  447. String receiptCompanyCityCode; //收件市码
  448. String receiptCompanyCityName; //收件市名
  449. String receiptCompanyName; //收件公司名称
  450. String receiptCompanyPhone; //收件公司电话
  451. String receiptCompanyProvinceCode; //收件省码
  452. String receiptCompanyProvinceName; //收件省名
  453. String sendCompanyAddress; //发件详细地址
  454. String sendCompanyAreaCode; //发件区码
  455. String sendCompanyAreaName; //发件区名
  456. String sendCompanyBankCard; //发件银行卡号
  457. String sendCompanyCityCode; //发件市码
  458. String sendCompanyCityName; //发件市名
  459. int sendCompanyId; //发件公司id
  460. String sendCompanyName; //发件公司名称
  461. String sendCompanyCode; //发件公司编码
  462. String sendCompanyProvinceCode; //发件公司市码
  463. String sendCompanyProvinceName; //发件公司市名
  464. String senderIdCard; //发件人身份证号
  465. String senderName; //发件人名称
  466. String senderPhone; //发件人电话
  467. OrderDetailData({
  468. this.orderNo,
  469. this.goods,
  470. this.goodsAgencyFund,
  471. this.goodsFlatCost,
  472. this.goodsFreight,
  473. this.goodsInsurance,
  474. this.goodsOtherFees,
  475. this.goodsPriceProtection,
  476. this.goodsQuantity,
  477. this.goodsValue,
  478. this.goodsWeight,
  479. this.id,
  480. this.memo,
  481. this.orderStatus,
  482. this.receiptCompanyAddress,
  483. this.receiptCompanyAreaCode,
  484. this.receiptCompanyAreaName,
  485. this.receiptCompanyPhone,
  486. this.receiptCompanyBankCard,
  487. this.receiptCompanyCityCode,
  488. this.receiptCompanyCityName,
  489. this.receiptCompanyName,
  490. this.receiptCompanyProvinceCode,
  491. this.receiptCompanyProvinceName,
  492. this.sendCompanyAddress,
  493. this.sendCompanyAreaCode,
  494. this.sendCompanyAreaName,
  495. this.sendCompanyBankCard,
  496. this.sendCompanyCityCode,
  497. this.sendCompanyCityName,
  498. this.sendCompanyId,
  499. this.sendCompanyName,
  500. this.sendCompanyCode,
  501. this.sendCompanyProvinceCode,
  502. this.sendCompanyProvinceName,
  503. this.senderIdCard,
  504. this.senderName,
  505. this.senderPhone
  506. });
  507. factory OrderDetailData.fromJson(Map < String, dynamic > json) {
  508. return OrderDetailData(
  509. orderNo: json['orderNo'],
  510. goods: json['goods'],
  511. goodsAgencyFund: json['goodsAgencyFund'],
  512. goodsFlatCost: json['goodsFlatCost'],
  513. goodsFreight: json['goodsFreight'],
  514. goodsInsurance: json['goodsInsurance'],
  515. goodsOtherFees: json['goodsOtherFees'],
  516. goodsPriceProtection: json['goodsPriceProtection'],
  517. goodsQuantity: json['goodsQuantity'],
  518. goodsValue: json['goodsValue'],
  519. goodsWeight: json['goodsWeight'],
  520. id: json['id'],
  521. memo: json['memo'],
  522. orderStatus: json['orderStatus'],
  523. receiptCompanyAddress: json['receiptCompanyAddress'],
  524. receiptCompanyAreaCode: json['receiptCompanyAreaCode'],
  525. receiptCompanyAreaName: json['receiptCompanyAreaName'],
  526. receiptCompanyBankCard: json['receiptCompanyBankCard'],
  527. receiptCompanyCityCode: json['receiptCompanyCityCode'],
  528. receiptCompanyCityName: json['receiptCompanyCityName'],
  529. receiptCompanyName: json['receiptCompanyName'],
  530. receiptCompanyPhone: json['receiptCompanyPhone'],
  531. receiptCompanyProvinceCode: json['receiptCompanyProvinceCode'],
  532. receiptCompanyProvinceName: json['receiptCompanyProvinceName'],
  533. sendCompanyAddress: json['sendCompanyAddress'],
  534. sendCompanyAreaCode: json['sendCompanyAreaCode'],
  535. sendCompanyAreaName: json['sendCompanyAreaName'],
  536. sendCompanyBankCard: json['sendCompanyBankCard'],
  537. sendCompanyCityCode: json['sendCompanyCityCode'],
  538. sendCompanyCityName: json['sendCompanyCityName '],
  539. sendCompanyId: json['sendCompanyId'],
  540. sendCompanyName: json['sendCompanyName'],
  541. sendCompanyCode: json['sendCompanyCode'],
  542. sendCompanyProvinceCode: json['sendCompanyProvinceCode'],
  543. sendCompanyProvinceName: json['sendCompanyProvinceName'],
  544. senderIdCard: json['senderIdCard'],
  545. senderName: json['senderName'],
  546. senderPhone: json['senderPhone']
  547. );
  548. }
  549. }
  550. //接单对象
  551. class OrderReception {
  552. bool success;
  553. int code;
  554. String msg;
  555. OrderReception({
  556. this.success,
  557. this.code,
  558. this.msg,
  559. });
  560. factory OrderReception.fromJson(Map < String, dynamic > json) {
  561. return OrderReception(
  562. success: json['success'],
  563. code: json['code'],
  564. msg: json['msg'],
  565. );
  566. }
  567. }
  568. //订单管理获取列表
  569. class FromStatusGetOrderObj {
  570. bool success;
  571. int code;
  572. String msg;
  573. FromStatusGetOrderData data;
  574. FromStatusGetOrderObj({
  575. this.success,
  576. this.code,
  577. this.msg,
  578. this.data
  579. });
  580. factory FromStatusGetOrderObj.fromJson(Map < String, dynamic > json) {
  581. return FromStatusGetOrderObj(
  582. success: json['success'],
  583. code: json['code'],
  584. msg: json['msg'],
  585. data: FromStatusGetOrderData.fromJson(json['data'])
  586. );
  587. }
  588. }
  589. class FromStatusGetOrderData {
  590. bool hasNextPage;
  591. List < FromStatusGetOrderList > items;
  592. int limit;
  593. int page;
  594. int totalCount;
  595. int totalPage;
  596. FromStatusGetOrderData({
  597. this.hasNextPage,
  598. this.items,
  599. this.limit,
  600. this.page,
  601. this.totalCount,
  602. this.totalPage,
  603. });
  604. factory FromStatusGetOrderData.fromJson(Map < String, dynamic > json) {
  605. List list = json['items'] as List;
  606. List < FromStatusGetOrderList > tempList = list.map((i) => FromStatusGetOrderList.fromJson(i)).toList();
  607. return FromStatusGetOrderData(
  608. hasNextPage: json['hasNextPage'],
  609. items: tempList,
  610. limit: json['limit'],
  611. page: json['page'],
  612. totalCount: json['totalCount'],
  613. totalPage: json['totalPage'],
  614. );
  615. }
  616. }
  617. class FromStatusGetOrderList {
  618. int goodsAgencyFund;
  619. int goodsFreight;
  620. int goodsQuantity;
  621. int orderStatus;
  622. String orderNo;
  623. String goods;
  624. String receiptCompanyName;
  625. String sendCompanyName;
  626. FromStatusGetOrderList({
  627. this.goodsAgencyFund,
  628. this.goodsFreight,
  629. this.goodsQuantity,
  630. this.orderStatus,
  631. this.orderNo,
  632. this.goods,
  633. this.receiptCompanyName,
  634. this.sendCompanyName,
  635. });
  636. factory FromStatusGetOrderList.fromJson(Map < String, dynamic > json) {
  637. return FromStatusGetOrderList(
  638. goodsAgencyFund: json['goodsAgencyFund'],
  639. goodsFreight: json['goodsFreight'],
  640. goodsQuantity: json['goodsQuantity'],
  641. orderStatus: json['orderStatus'],
  642. orderNo: json['orderNo'],
  643. goods: json['goods'],
  644. receiptCompanyName: json['receiptCompanyName'],
  645. sendCompanyName: json['sendCompanyName'],
  646. );
  647. }
  648. }
  649. //提交改单、作废、寄件、拒收、签收后返回对象
  650. class OrderStatusReturnObj {
  651. bool success;
  652. int code;
  653. String msg;
  654. OrderStatusReturnObj({
  655. this.success,
  656. this.code,
  657. this.msg
  658. });
  659. factory OrderStatusReturnObj.fromJson(Map < String, dynamic > json) {
  660. return OrderStatusReturnObj(
  661. success: json['success'],
  662. code: json['code'],
  663. msg: json['msg'],
  664. );
  665. }
  666. }
  667. //模糊匹配订单号返回对象
  668. class LikeOrderNo {
  669. bool success;
  670. int code;
  671. String msg;
  672. List data;
  673. LikeOrderNo({
  674. this.success,
  675. this.code,
  676. this.msg,
  677. this.data,
  678. });
  679. factory LikeOrderNo.fromJson(Map<String,dynamic>json){
  680. return LikeOrderNo(
  681. success:json['success'],
  682. code:json['code'],
  683. msg:json['msg'],
  684. data:json['data'],
  685. );
  686. }
  687. }