models.dart 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. //登录
  2. class Login{
  3. bool success;
  4. int code;
  5. String msg;
  6. LoginMap data;
  7. Login({this.success,this.code,this.msg,this.data});
  8. factory Login.fromJson(Map<String,dynamic> json){
  9. LoginMap tempData = LoginMap.fromJson(json['data']);
  10. return Login(
  11. success: json['success'],
  12. code:json['code'],
  13. msg:json['msg'],
  14. data:tempData
  15. );
  16. }
  17. }
  18. class LoginMap {
  19. String avatarUrl;
  20. String nickName;
  21. int roleType;
  22. String userId;
  23. int status;
  24. String token;
  25. LoginMap({
  26. this.userId,
  27. this.avatarUrl,
  28. this.nickName,
  29. this.roleType,
  30. this.status,
  31. this.token
  32. });
  33. factory LoginMap.fromJson(Map < String, dynamic > json) {
  34. return LoginMap(
  35. avatarUrl: json['avatarUrl'],
  36. nickName: json['nickName'],
  37. roleType: json['roleType'],
  38. userId: json['userId'],
  39. status: json['status'],
  40. token: json['token'],
  41. );
  42. }
  43. }
  44. //接单页列表
  45. class OrderListObj {
  46. bool success;
  47. int code;
  48. String msg;
  49. OrderListData data;
  50. OrderListObj({
  51. this.success,
  52. this.code,
  53. this.msg,
  54. this.data
  55. });
  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. }
  65. class OrderListData{
  66. bool hasNextPage;
  67. List<OrderList> items;
  68. int limit;
  69. int page;
  70. int totalCount;
  71. int totalPage;
  72. OrderListData({
  73. this.hasNextPage,
  74. this.items,
  75. this.limit,
  76. this.page,
  77. this.totalCount,
  78. this.totalPage
  79. });
  80. factory OrderListData.fromJson(Map<String,dynamic>json){
  81. List list = json['items'] as List;
  82. List < OrderList > tempOrderList = list.map((i) => OrderList.fromJson(i)).toList();
  83. return OrderListData(
  84. hasNextPage: json['hasNextPage'],
  85. items:tempOrderList,
  86. limit: json['limit'],
  87. page:json['page'],
  88. totalCount: json['totalCount'],
  89. totalPage: json['totalPage']
  90. );
  91. }
  92. }
  93. class OrderList {
  94. String orderNo;
  95. int createTime;
  96. String goods;
  97. int goodsQuantity;
  98. String receiptCompanyAddress;
  99. String receiptCompanyName;
  100. String receiptCompanyPhone;
  101. String sendCompanyAddress;
  102. String sendCompanyName;
  103. String sendCompanyPhone;
  104. OrderList({
  105. this.orderNo,
  106. this.createTime,
  107. this.goods,
  108. this.goodsQuantity,
  109. this.receiptCompanyAddress,
  110. this.receiptCompanyName,
  111. this.receiptCompanyPhone,
  112. this.sendCompanyAddress,
  113. this.sendCompanyName,
  114. this.sendCompanyPhone
  115. });
  116. factory OrderList.fromJson(Map < String, dynamic > json) {
  117. return OrderList(
  118. orderNo: json['orderNo'],
  119. createTime: json['createTime'],
  120. goods: json['goods'],
  121. goodsQuantity: json['goodsQuantity'],
  122. receiptCompanyAddress: json['receiptCompanyAddress'],
  123. receiptCompanyName:json['receiptCompanyName'],
  124. receiptCompanyPhone:json['receiptCompanyPhone'],
  125. sendCompanyAddress:json['sendCompanyAddress'],
  126. sendCompanyName:json['sendCompanyName'],
  127. sendCompanyPhone:json['sendCompanyPhone']
  128. );
  129. }
  130. }
  131. //获取站点
  132. class Station{
  133. bool success;
  134. int code;
  135. String msg;
  136. List<StationList> data;
  137. Station({this.success,this.code,this.msg,this.data});
  138. factory Station.fromJson(Map<String,dynamic> json){
  139. List list = json['data'] as List;
  140. print(list.toString());
  141. List<StationList> tempList = list.map((i)=>StationList.fromJson(i)).toList();
  142. return Station(
  143. success: json['success'],
  144. code:json['code'],
  145. msg:json['msg'],
  146. data:tempList
  147. );
  148. }
  149. }
  150. class StationList{
  151. String code;
  152. int id;
  153. String name;
  154. int stationStatus;
  155. int status;
  156. StationList({this.code,this.id,this.name,this.stationStatus,this.status});
  157. factory StationList.fromJson(Map<String,dynamic> json){
  158. return StationList(
  159. code:json['code'],
  160. id:json['id'],
  161. name:json['name'],
  162. stationStatus: json['stationStatus'],
  163. status: json['status']
  164. );
  165. }
  166. }
  167. //站点线路
  168. class StationLine{
  169. bool success;
  170. int code;
  171. String msg;
  172. List<LineObj> data;
  173. StationLine({this.success,this.code,this.msg,this.data});
  174. factory StationLine.fromJson(Map<String,dynamic> json){
  175. var list = json['data'] as List;
  176. List<LineObj> tempList = list.map((i)=>LineObj.fromJson(i)).toList();
  177. return StationLine(
  178. success: json['success'],
  179. code:json['code'],
  180. msg:json['msg'],
  181. data:tempList
  182. );
  183. }
  184. }
  185. class LineObj{
  186. String code;
  187. int id;
  188. String name;
  189. LineObj({this.code,this.name,this.id});
  190. factory LineObj.fromJson(Map<String,dynamic> json){
  191. return LineObj(
  192. code:json['code'],
  193. id:json['id'],
  194. name:json['name']
  195. );
  196. }
  197. }
  198. //修改密码
  199. class UpdataPasswrod{
  200. bool success;
  201. int code;
  202. String msg;
  203. String data;
  204. UpdataPasswrod({this.success,this.code,this.msg,this.data});
  205. factory UpdataPasswrod.fromJson(Map<String,dynamic> json){
  206. return UpdataPasswrod(
  207. success: json['success'],
  208. code: json['code'],
  209. msg:json['msg'],
  210. data:json['data']
  211. );
  212. }
  213. }