models.dart 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777
  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. String stationId;
  31. LoginMap({
  32. this.userId,
  33. this.avatarUrl,
  34. this.nickName,
  35. this.roleType,
  36. this.status,
  37. this.token,
  38. this.stationId
  39. });
  40. factory LoginMap.fromJson(Map < String, dynamic > json) {
  41. return LoginMap(
  42. avatarUrl: json['avatarUrl'],
  43. nickName: json['nickName'],
  44. roleType: json['roleType'],
  45. userId: json['userId'],
  46. status: json['status'],
  47. token: json['token'],
  48. stationId:json['stationId'].toString()
  49. );
  50. }
  51. }
  52. //接单页列表
  53. class OrderListObj {
  54. bool success;
  55. int code;
  56. String msg;
  57. OrderListData data;
  58. OrderListObj({
  59. this.success,
  60. this.code,
  61. this.msg,
  62. this.data
  63. });
  64. factory OrderListObj.fromJson(Map < String, dynamic > json) {
  65. return OrderListObj(
  66. success: json['success'],
  67. code: json['code'],
  68. msg: json['msg'],
  69. data: OrderListData.fromJson(json['data'])
  70. );
  71. }
  72. }
  73. class OrderListData {
  74. bool hasNextPage;
  75. List < OrderList > items;
  76. int limit;
  77. int page;
  78. int totalCount;
  79. int totalPage;
  80. OrderListData({
  81. this.hasNextPage,
  82. this.items,
  83. this.limit,
  84. this.page,
  85. this.totalCount,
  86. this.totalPage
  87. });
  88. factory OrderListData.fromJson(Map < String, dynamic > json) {
  89. List list = json['items'] as List;
  90. List < OrderList > tempOrderList = list.map((i) => OrderList.fromJson(i)).toList();
  91. return OrderListData(
  92. hasNextPage: json['hasNextPage'],
  93. items: tempOrderList,
  94. limit: json['limit'],
  95. page: json['page'],
  96. totalCount: json['totalCount'],
  97. totalPage: json['totalPage']
  98. );
  99. }
  100. }
  101. class OrderList {
  102. String orderNo;
  103. int createTime;
  104. String goods;
  105. int goodsQuantity;
  106. String receiptCompanyAddress;
  107. String receiptCompanyName;
  108. String receiptCompanyPhone;
  109. String sendCompanyAddress;
  110. String sendCompanyName;
  111. String sendCompanyPhone;
  112. OrderList({
  113. this.orderNo,
  114. this.createTime,
  115. this.goods,
  116. this.goodsQuantity,
  117. this.receiptCompanyAddress,
  118. this.receiptCompanyName,
  119. this.receiptCompanyPhone,
  120. this.sendCompanyAddress,
  121. this.sendCompanyName,
  122. this.sendCompanyPhone
  123. });
  124. factory OrderList.fromJson(Map < String, dynamic > json) {
  125. return OrderList(
  126. orderNo: json['orderNo'],
  127. createTime: json['createTime'],
  128. goods: json['goods'],
  129. goodsQuantity: json['goodsQuantity'],
  130. receiptCompanyAddress: json['receiptCompanyAddress'],
  131. receiptCompanyName: json['receiptCompanyName'],
  132. receiptCompanyPhone: json['receiptCompanyPhone'],
  133. sendCompanyAddress: json['sendCompanyAddress'],
  134. sendCompanyName: json['sendCompanyName'],
  135. sendCompanyPhone: json['sendCompanyPhone']
  136. );
  137. }
  138. }
  139. //获取站点
  140. class Station {
  141. bool success;
  142. int code;
  143. String msg;
  144. List < StationList > data;
  145. Station({
  146. this.success,
  147. this.code,
  148. this.msg,
  149. this.data
  150. });
  151. factory Station.fromJson(Map < String, dynamic > json) {
  152. List list = json['data'] as List;
  153. print(list.toString());
  154. List < StationList > tempList = list.map((i) => StationList.fromJson(i)).toList();
  155. return Station(
  156. success: json['success'],
  157. code: json['code'],
  158. msg: json['msg'],
  159. data: tempList
  160. );
  161. }
  162. }
  163. class StationList {
  164. String code;
  165. int id;
  166. String name;
  167. int stationStatus;
  168. int status;
  169. StationList({
  170. this.code,
  171. this.id,
  172. this.name,
  173. this.stationStatus,
  174. this.status
  175. });
  176. factory StationList.fromJson(Map < String, dynamic > json) {
  177. return StationList(
  178. code: json['code'],
  179. id: json['id'],
  180. name: json['name'],
  181. stationStatus: json['stationStatus'],
  182. status: json['status']
  183. );
  184. }
  185. }
  186. //站点线路
  187. class StationLine {
  188. bool success;
  189. int code;
  190. String msg;
  191. List < LineObj > data;
  192. StationLine({
  193. this.success,
  194. this.code,
  195. this.msg,
  196. this.data
  197. });
  198. factory StationLine.fromJson(Map < String, dynamic > json) {
  199. var list = json['data'] as List;
  200. List < LineObj > tempList = list.map((i) => LineObj.fromJson(i)).toList();
  201. return StationLine(
  202. success: json['success'],
  203. code: json['code'],
  204. msg: json['msg'],
  205. data: tempList
  206. );
  207. }
  208. }
  209. class LineObj {
  210. String code;
  211. int id;
  212. String name;
  213. LineObj({
  214. this.code,
  215. this.name,
  216. this.id
  217. });
  218. factory LineObj.fromJson(Map < String, dynamic > json) {
  219. return LineObj(
  220. code: json['code'],
  221. id: json['id'],
  222. name: json['name']
  223. );
  224. }
  225. }
  226. //修改密码
  227. class UpdataPasswrod {
  228. bool success;
  229. int code;
  230. String msg;
  231. String data;
  232. UpdataPasswrod({
  233. this.success,
  234. this.code,
  235. this.msg,
  236. this.data
  237. });
  238. factory UpdataPasswrod.fromJson(Map < String, dynamic > json) {
  239. return UpdataPasswrod(
  240. success: json['success'],
  241. code: json['code'],
  242. msg: json['msg'],
  243. data: json['data']
  244. );
  245. }
  246. }
  247. //手机号模糊匹配
  248. class LikePhone {
  249. bool success;
  250. int code;
  251. String msg;
  252. List < LikePhoneList > data;
  253. LikePhone({
  254. this.success,
  255. this.code,
  256. this.msg,
  257. this.data
  258. });
  259. factory LikePhone.fromJson(Map < String, dynamic > json) {
  260. List list = json['data'] as List;
  261. List < LikePhoneList > tempList = list.map((i) => LikePhoneList.fromJson(i)).toList();
  262. return LikePhone(
  263. success: json['success'],
  264. code: json['code'],
  265. msg: json['msg'],
  266. data: tempList
  267. );
  268. }
  269. }
  270. class LikePhoneList {
  271. String address;
  272. String areaCode;
  273. String areaName;
  274. String cityCode;
  275. String cityName;
  276. String companyCode;
  277. String companyName;
  278. String companyPhone;
  279. int id;
  280. String provinceCode;
  281. String provinceName;
  282. String uzerPhone;
  283. LikePhoneList({
  284. this.address,
  285. this.areaCode,
  286. this.areaName,
  287. this.cityCode,
  288. this.cityName,
  289. this.companyCode,
  290. this.companyName,
  291. this.companyPhone,
  292. this.id,
  293. this.provinceCode,
  294. this.provinceName,
  295. this.uzerPhone
  296. });
  297. factory LikePhoneList.fromJson(Map < String, dynamic > json) {
  298. return LikePhoneList(
  299. address: json['address'],
  300. areaCode: json['areaCode'],
  301. areaName: json['areaName'],
  302. cityCode: json['cityCode'],
  303. cityName: json['cityName'],
  304. companyCode: json['companyCode'],
  305. companyName: json['companyName'],
  306. companyPhone: json['companyPhone'],
  307. id: json['id'],
  308. provinceCode: json['provinceCode'],
  309. provinceName: json['provinceName'],
  310. uzerPhone: json['uzerPhone']
  311. );
  312. }
  313. }
  314. //商品类别列表
  315. class GoodsCategory {
  316. bool success;
  317. int code;
  318. String msg;
  319. List < GoodCategoryList > data;
  320. GoodsCategory({
  321. this.success,
  322. this.code,
  323. this.msg,
  324. this.data
  325. });
  326. factory GoodsCategory.fromJson(Map < String, dynamic > json) {
  327. List list = json['data'] as List;
  328. List < GoodCategoryList > tempList = list.map((i) => GoodCategoryList.fromJson(i)).toList();
  329. return GoodsCategory(
  330. success: json['success'],
  331. code: json['code'],
  332. msg: json['msg'],
  333. data: tempList
  334. );
  335. }
  336. }
  337. class GoodCategoryList {
  338. int id;
  339. String name;
  340. GoodCategoryList({
  341. this.id,
  342. this.name
  343. });
  344. factory GoodCategoryList.fromJson(Map < String, dynamic > json) {
  345. return GoodCategoryList(
  346. id: json['id'],
  347. name: json['name']
  348. );
  349. }
  350. }
  351. //商品包装类别列表
  352. class GoodsPackage {
  353. bool success;
  354. int code;
  355. String msg;
  356. List < GoodsPackageList > data;
  357. GoodsPackage({
  358. this.success,
  359. this.code,
  360. this.msg,
  361. this.data
  362. });
  363. factory GoodsPackage.fromJson(Map < String, dynamic > json) {
  364. List list = json['data'] as List;
  365. List < GoodsPackageList > tempList = list.map((i) => GoodsPackageList.fromJson(i)).toList();
  366. return GoodsPackage(
  367. success: json['success'],
  368. code: json['code'],
  369. msg: json['msg'],
  370. data: tempList
  371. );
  372. }
  373. }
  374. class GoodsPackageList {
  375. int id;
  376. String name;
  377. GoodsPackageList({
  378. this.id,
  379. this.name
  380. });
  381. factory GoodsPackageList.fromJson(Map < String, dynamic > json) {
  382. return GoodsPackageList(
  383. id: json['id'],
  384. name: json['name']
  385. );
  386. }
  387. }
  388. //创建订单
  389. class CreateOrder {
  390. bool success;
  391. int code;
  392. String msg;
  393. String orderNo;
  394. CreateOrder({
  395. this.success,
  396. this.code,
  397. this.msg,
  398. this.orderNo
  399. });
  400. factory CreateOrder.fromJson(Map < String, dynamic > json) {
  401. return CreateOrder(
  402. success: json['success'],
  403. code: json['code'],
  404. msg: json['msg'],
  405. orderNo: json['data']['orderNo']
  406. );
  407. }
  408. }
  409. //订单详情
  410. class OrderDetailObj {
  411. bool success;
  412. int code;
  413. String msg;
  414. OrderDetailData data;
  415. OrderDetailObj({
  416. this.success,
  417. this.code,
  418. this.msg,
  419. this.data,
  420. });
  421. factory OrderDetailObj.fromJson(Map < String, dynamic > json) {
  422. OrderDetailData tempData = OrderDetailData.fromJson(json['data']);
  423. return OrderDetailObj(
  424. success: json['success'],
  425. code: json['code'],
  426. msg: json['msg'],
  427. data: tempData
  428. );
  429. }
  430. }
  431. class OrderDetailData {
  432. String orderNo;
  433. String goods; //商品名称
  434. int goodsAgencyFund; //代收款
  435. int goodsFlatCost; //工本费
  436. int goodsFreight; //运费
  437. int goodsInsurance; //商品保险费
  438. int goodsOtherFees; //其他费用
  439. int goodsPriceProtection; //商品保价
  440. int goodsQuantity; //商品数量
  441. int goodsValue; //商品价值
  442. double goodsWeight; //商品重量
  443. int id; //订单Id
  444. String memo; //备注
  445. int orderStatus; //订单状态 0:代收单,1:已接单,2:配送中,3:已签收,4:拒收
  446. String receiptCompanyAddress; //收件详细地址
  447. String receiptCompanyAreaCode; //收件区码
  448. String receiptCompanyAreaName; //收件区名
  449. String receiptCompanyBankCard; //收件银行卡号
  450. String receiptCompanyCityCode; //收件市码
  451. String receiptCompanyCityName; //收件市名
  452. String receiptCompanyName; //收件公司名称
  453. String receiptCompanyPhone; //收件公司电话
  454. String receiptCompanyProvinceCode; //收件省码
  455. String receiptCompanyProvinceName; //收件省名
  456. String sendCompanyAddress; //发件详细地址
  457. String sendCompanyAreaCode; //发件区码
  458. String sendCompanyAreaName; //发件区名
  459. String sendCompanyBankCard; //发件银行卡号
  460. String sendCompanyCityCode; //发件市码
  461. String sendCompanyCityName; //发件市名
  462. int sendCompanyId; //发件公司id
  463. String sendCompanyName; //发件公司名称
  464. String sendCompanyCode; //发件公司编码
  465. String sendCompanyProvinceCode; //发件公司市码
  466. String sendCompanyProvinceName; //发件公司市名
  467. String senderIdCard; //发件人身份证号
  468. String senderName; //发件人名称
  469. String senderPhone; //发件人电话
  470. OrderDetailData({
  471. this.orderNo,
  472. this.goods,
  473. this.goodsAgencyFund,
  474. this.goodsFlatCost,
  475. this.goodsFreight,
  476. this.goodsInsurance,
  477. this.goodsOtherFees,
  478. this.goodsPriceProtection,
  479. this.goodsQuantity,
  480. this.goodsValue,
  481. this.goodsWeight,
  482. this.id,
  483. this.memo,
  484. this.orderStatus,
  485. this.receiptCompanyAddress,
  486. this.receiptCompanyAreaCode,
  487. this.receiptCompanyAreaName,
  488. this.receiptCompanyPhone,
  489. this.receiptCompanyBankCard,
  490. this.receiptCompanyCityCode,
  491. this.receiptCompanyCityName,
  492. this.receiptCompanyName,
  493. this.receiptCompanyProvinceCode,
  494. this.receiptCompanyProvinceName,
  495. this.sendCompanyAddress,
  496. this.sendCompanyAreaCode,
  497. this.sendCompanyAreaName,
  498. this.sendCompanyBankCard,
  499. this.sendCompanyCityCode,
  500. this.sendCompanyCityName,
  501. this.sendCompanyId,
  502. this.sendCompanyName,
  503. this.sendCompanyCode,
  504. this.sendCompanyProvinceCode,
  505. this.sendCompanyProvinceName,
  506. this.senderIdCard,
  507. this.senderName,
  508. this.senderPhone
  509. });
  510. factory OrderDetailData.fromJson(Map < String, dynamic > json) {
  511. return OrderDetailData(
  512. orderNo: json['orderNo'],
  513. goods: json['goods'],
  514. goodsAgencyFund: json['goodsAgencyFund'],
  515. goodsFlatCost: json['goodsFlatCost'],
  516. goodsFreight: json['goodsFreight'],
  517. goodsInsurance: json['goodsInsurance'],
  518. goodsOtherFees: json['goodsOtherFees'],
  519. goodsPriceProtection: json['goodsPriceProtection'],
  520. goodsQuantity: json['goodsQuantity'],
  521. goodsValue: json['goodsValue'],
  522. goodsWeight: json['goodsWeight'],
  523. id: json['id'],
  524. memo: json['memo'],
  525. orderStatus: json['orderStatus'],
  526. receiptCompanyAddress: json['receiptCompanyAddress'],
  527. receiptCompanyAreaCode: json['receiptCompanyAreaCode'],
  528. receiptCompanyAreaName: json['receiptCompanyAreaName'],
  529. receiptCompanyBankCard: json['receiptCompanyBankCard'],
  530. receiptCompanyCityCode: json['receiptCompanyCityCode'],
  531. receiptCompanyCityName: json['receiptCompanyCityName'],
  532. receiptCompanyName: json['receiptCompanyName'],
  533. receiptCompanyPhone: json['receiptCompanyPhone'],
  534. receiptCompanyProvinceCode: json['receiptCompanyProvinceCode'],
  535. receiptCompanyProvinceName: json['receiptCompanyProvinceName'],
  536. sendCompanyAddress: json['sendCompanyAddress'],
  537. sendCompanyAreaCode: json['sendCompanyAreaCode'],
  538. sendCompanyAreaName: json['sendCompanyAreaName'],
  539. sendCompanyBankCard: json['sendCompanyBankCard'],
  540. sendCompanyCityCode: json['sendCompanyCityCode'],
  541. sendCompanyCityName: json['sendCompanyCityName'],
  542. sendCompanyId: json['sendCompanyId'],
  543. sendCompanyName: json['sendCompanyName'],
  544. sendCompanyCode: json['sendCompanyCode'],
  545. sendCompanyProvinceCode: json['sendCompanyProvinceCode'],
  546. sendCompanyProvinceName: json['sendCompanyProvinceName'],
  547. senderIdCard: json['senderIdCard'],
  548. senderName: json['senderName'],
  549. senderPhone: json['senderPhone']
  550. );
  551. }
  552. }
  553. //接单对象
  554. class OrderReception {
  555. bool success;
  556. int code;
  557. String msg;
  558. OrderReception({
  559. this.success,
  560. this.code,
  561. this.msg,
  562. });
  563. factory OrderReception.fromJson(Map < String, dynamic > json) {
  564. return OrderReception(
  565. success: json['success'],
  566. code: json['code'],
  567. msg: json['msg'],
  568. );
  569. }
  570. }
  571. //订单管理获取列表
  572. class FromStatusGetOrderObj {
  573. bool success;
  574. int code;
  575. String msg;
  576. FromStatusGetOrderData data;
  577. FromStatusGetOrderObj({
  578. this.success,
  579. this.code,
  580. this.msg,
  581. this.data
  582. });
  583. factory FromStatusGetOrderObj.fromJson(Map < String, dynamic > json) {
  584. return FromStatusGetOrderObj(
  585. success: json['success'],
  586. code: json['code'],
  587. msg: json['msg'],
  588. data: FromStatusGetOrderData.fromJson(json['data'])
  589. );
  590. }
  591. }
  592. class FromStatusGetOrderData {
  593. bool hasNextPage;
  594. List < FromStatusGetOrderList > items;
  595. int limit;
  596. int page;
  597. int totalCount;
  598. int totalPage;
  599. FromStatusGetOrderData({
  600. this.hasNextPage,
  601. this.items,
  602. this.limit,
  603. this.page,
  604. this.totalCount,
  605. this.totalPage,
  606. });
  607. factory FromStatusGetOrderData.fromJson(Map < String, dynamic > json) {
  608. List list = json['items'] as List;
  609. List < FromStatusGetOrderList > tempList = list.map((i) => FromStatusGetOrderList.fromJson(i)).toList();
  610. return FromStatusGetOrderData(
  611. hasNextPage: json['hasNextPage'],
  612. items: tempList,
  613. limit: json['limit'],
  614. page: json['page'],
  615. totalCount: json['totalCount'],
  616. totalPage: json['totalPage'],
  617. );
  618. }
  619. }
  620. class FromStatusGetOrderList {
  621. int goodsAgencyFund;
  622. int goodsFreight;
  623. int goodsQuantity;
  624. int orderStatus;
  625. String orderNo;
  626. String goods;
  627. String receiptCompanyName;
  628. String sendCompanyName;
  629. FromStatusGetOrderList({
  630. this.goodsAgencyFund,
  631. this.goodsFreight,
  632. this.goodsQuantity,
  633. this.orderStatus,
  634. this.orderNo,
  635. this.goods,
  636. this.receiptCompanyName,
  637. this.sendCompanyName,
  638. });
  639. factory FromStatusGetOrderList.fromJson(Map < String, dynamic > json) {
  640. return FromStatusGetOrderList(
  641. goodsAgencyFund: json['goodsAgencyFund'],
  642. goodsFreight: json['goodsFreight'],
  643. goodsQuantity: json['goodsQuantity'],
  644. orderStatus: json['orderStatus'],
  645. orderNo: json['orderNo'],
  646. goods: json['goods'],
  647. receiptCompanyName: json['receiptCompanyName'],
  648. sendCompanyName: json['sendCompanyName'],
  649. );
  650. }
  651. }
  652. //提交改单、作废、寄件、拒收、签收后返回对象
  653. class OrderStatusReturnObj {
  654. bool success;
  655. int code;
  656. String msg;
  657. OrderStatusReturnObj({
  658. this.success,
  659. this.code,
  660. this.msg
  661. });
  662. factory OrderStatusReturnObj.fromJson(Map < String, dynamic > json) {
  663. return OrderStatusReturnObj(
  664. success: json['success'],
  665. code: json['code'],
  666. msg: json['msg'],
  667. );
  668. }
  669. }
  670. //模糊匹配订单号返回对象
  671. class LikeOrderNo {
  672. bool success;
  673. int code;
  674. String msg;
  675. List data;
  676. LikeOrderNo({
  677. this.success,
  678. this.code,
  679. this.msg,
  680. this.data,
  681. });
  682. factory LikeOrderNo.fromJson(Map<String,dynamic>json){
  683. return LikeOrderNo(
  684. success:json['success'],
  685. code:json['code'],
  686. msg:json['msg'],
  687. data:json['data'],
  688. );
  689. }
  690. }
  691. //验证token是否过期返回对象
  692. class CheckToken{
  693. bool success;
  694. int code;
  695. String msg;
  696. String data;
  697. CheckToken({
  698. this.success,
  699. this.code,
  700. this.msg,
  701. this.data,
  702. });
  703. factory CheckToken.fromJson(Map<String,dynamic> json){
  704. return CheckToken(
  705. success:json['success'],
  706. code:json['code'],
  707. msg:json['msg'],
  708. data:json['data'],
  709. );
  710. }
  711. }