models.dart 20 KB

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