forked from OiPunk/OnlineTaxi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathonline-taxi-sql.sql
2063 lines (1902 loc) · 129 KB
/
online-taxi-sql.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for tbl_ads
-- ----------------------------
DROP TABLE IF EXISTS `tbl_ads`;
CREATE TABLE `tbl_ads` (
`id` int(16) unsigned NOT NULL AUTO_INCREMENT,
`down_load_url` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '视频/图片地址',
`link_url` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '链接地址',
`video_img` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '视频图片',
`position_id` int(16) NOT NULL DEFAULT '0' COMMENT '广告位id',
`start_time` datetime NOT NULL COMMENT '开始时间',
`end_time` datetime NOT NULL COMMENT '结束时间',
`city` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '展示城市',
`name` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '广告名称',
`platform` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '平台',
`type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1:视频;2:图片',
`people_tag_id` tinyint(3) NOT NULL DEFAULT '0' COMMENT '人群模板id',
`status` int(11) NOT NULL DEFAULT '0' COMMENT '1启用0停用',
`operator_user` int(10) DEFAULT NULL COMMENT '操作人',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=95 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `tbl_ad_position`;
CREATE TABLE `tbl_ad_position` (
`id` int(16) unsigned NOT NULL AUTO_INCREMENT COMMENT '广告位id',
`position_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '广告位名称',
`position_desc` text COLLATE utf8_unicode_ci NOT NULL COMMENT '广告位描述',
`position_type` tinyint(1) NOT NULL COMMENT '广告位类型(1:客户端;2:大屏端)',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态(0:暂停;1:开启)',
`most_count` tinyint(3) NOT NULL DEFAULT '0' COMMENT '广告上限',
`content_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '内容类型(1:视频;2:图片)',
`operator_user` int(10) NOT NULL DEFAULT '0' COMMENT '操作者',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `tbl_alipay_callback_info`;
CREATE TABLE `tbl_alipay_callback_info` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`notify_time` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '通知时间',
`notify_type` varchar(64) CHARACTER SET utf8 DEFAULT NULL COMMENT '通知类型',
`notify_id` varchar(128) CHARACTER SET utf8 DEFAULT NULL COMMENT '通知校验ID',
`app_id` varchar(32) CHARACTER SET utf8 DEFAULT NULL COMMENT '支付宝分配给开发者的应用ID',
`charset` varchar(10) CHARACTER SET utf8 DEFAULT NULL COMMENT 'CHARSET',
`version` varchar(3) CHARACTER SET utf8 DEFAULT NULL COMMENT '接口版本',
`sign_type` varchar(10) CHARACTER SET utf8 DEFAULT NULL COMMENT '签名类型',
`sign` varchar(256) CHARACTER SET utf8 DEFAULT NULL COMMENT '签名',
`trade_no` varchar(64) CHARACTER SET utf8 DEFAULT NULL COMMENT '支付宝交易号',
`out_trade_no` varchar(64) CHARACTER SET utf8 DEFAULT NULL COMMENT '商户订单号',
`out_biz_no` varchar(64) CHARACTER SET utf8 DEFAULT NULL COMMENT '商户业务号',
`buyer_id` varchar(16) CHARACTER SET utf8 DEFAULT NULL COMMENT '买家支付宝用户号',
`buyer_logon_id` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '买家支付宝账号',
`seller_id` varchar(30) CHARACTER SET utf8 DEFAULT NULL COMMENT '卖家支付宝用户号',
`seller_email` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '卖家支付宝账号',
`trade_status` varchar(32) CHARACTER SET utf8 DEFAULT NULL COMMENT '交易状态',
`total_amount` varchar(11) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '订单金额',
`receipt_amount` varchar(11) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '实收金额',
`invoice_amount` varchar(11) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '开票金额',
`buyer_pay_amount` varchar(11) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '付款金额',
`point_amount` varchar(11) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '集分宝金额',
`refund_fee` varchar(11) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '总退款金额',
`subject` varchar(256) CHARACTER SET utf8 DEFAULT NULL COMMENT '订单标题',
`body` varchar(256) CHARACTER SET utf8 DEFAULT NULL COMMENT '商品描述',
`gmt_create` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '交易创建时间',
`gmt_payment` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '交易付款时间',
`gmt_refund` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '交易退款时间',
`gmt_close` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '交易结束时间',
`fund_bill_list` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '支付金额信息',
`passback_params` varchar(100) CHARACTER SET utf8 DEFAULT NULL COMMENT '回传参数',
`voucher_detail_list` varchar(4) CHARACTER SET utf8 DEFAULT NULL COMMENT '优惠券信息',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=135 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='支付宝回调信息表';
DROP TABLE IF EXISTS `tbl_app_version_update`;
CREATE TABLE `tbl_app_version_update` (
`id` int(16) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`platform` smallint(6) NOT NULL DEFAULT '0' COMMENT '上线系统 平台 1: ios, 2: android',
`notice_type` smallint(6) NOT NULL DEFAULT '0' COMMENT '通知类型(1:强制 2:非强制)',
`prompt` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '升级提示(不超过30个字)',
`note` varchar(500) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
`start_time` datetime NOT NULL COMMENT '生效开始时间 ',
`end_time` datetime NOT NULL COMMENT '生效结束时间',
`download_url` varchar(500) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '安装包url',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`operator_id` int(11) NOT NULL COMMENT '创建人',
`app_type` int(2) NOT NULL COMMENT '1:乘客端,2:司机端 3:车机端',
`app_version` varchar(16) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'app版本号',
`use_status` int(2) NOT NULL DEFAULT '1' COMMENT '启用停用状态,0:停用,1:启用',
`version_code` int(11) NOT NULL DEFAULT '0' COMMENT '版本号code',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='乘客端,司机端,车机端app更新';
DROP TABLE IF EXISTS `tbl_base_info_company`;
CREATE TABLE `tbl_base_info_company` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`company_name` varchar(256) NOT NULL COMMENT '公司名称',
`identifier` varchar(32) NOT NULL COMMENT '统一社会信用代码',
`business_scope` varchar(256) NOT NULL COMMENT '经营范围',
`contact_address` varchar(256) NOT NULL COMMENT '通信地址',
`economic_type` varchar(128) NOT NULL COMMENT '经营业户经济类型',
`reg_capital` varchar(128) NOT NULL COMMENT '注册资本',
`legal_name` varchar(256) NOT NULL COMMENT '法人代表姓名',
`legal_id` varchar(32) NOT NULL COMMENT '法人代表身份证号',
`legal_phone` varchar(32) NOT NULL COMMENT '法人代表电话',
`legal_photo` varchar(128) NOT NULL COMMENT '法人代表身份证扫描件文件编号',
`state` int(1) NOT NULL COMMENT '状态0有效,1失效',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='网约车平台公司基本信息';
DROP TABLE IF EXISTS `tbl_base_info_company_pay`;
CREATE TABLE `tbl_base_info_company_pay` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`pay_name` varchar(256) NOT NULL COMMENT '银行或非银行支付机构名称',
`pay_id` varchar(32) NOT NULL COMMENT '非银行支付机构支付业务许可证编号',
`pay_type` varchar(64) NOT NULL COMMENT '支付业务类型',
`pay_scope` varchar(64) NOT NULL COMMENT '业务覆盖范围',
`prepare_bank` varchar(64) NOT NULL COMMENT '备付金存管银行',
`count_date` int(10) NOT NULL COMMENT '结算周期(天)',
`state` int(1) NOT NULL COMMENT '状态0有效,1失效',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='网约车平台公司支付信息';
-- ----------------------------
-- Records of tbl_base_info_company_pay
-- ----------------------------
-- ----------------------------
-- Table structure for tbl_base_info_company_permit
-- ----------------------------
DROP TABLE IF EXISTS `tbl_base_info_company_permit`;
CREATE TABLE `tbl_base_info_company_permit` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`certificate` varchar(64) NOT NULL COMMENT '网络预约出租汽车经营许可证号',
`operation_area` varchar(128) NOT NULL COMMENT '经营区域',
`owner_name` varchar(256) NOT NULL COMMENT '公司名称',
`organization` varchar(256) NOT NULL COMMENT '发证机构名称',
`start_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP COMMENT '有效期起',
`stop_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP COMMENT '有效期止',
`certify_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP COMMENT '初次发证日期',
`state` varchar(8) NOT NULL COMMENT '证照状态',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='网约车平台公司经营许可证';
-- ----------------------------
-- Records of tbl_base_info_company_permit
-- ----------------------------
-- ----------------------------
-- Table structure for tbl_base_info_company_service
-- ----------------------------
DROP TABLE IF EXISTS `tbl_base_info_company_service`;
CREATE TABLE `tbl_base_info_company_service` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`service_name` varchar(128) NOT NULL COMMENT '服务机构名称',
`service_no` varchar(64) NOT NULL COMMENT '服务机构代码',
`detail_address` varchar(128) NOT NULL COMMENT '服务机构地址',
`responsible_name` varchar(64) NOT NULL COMMENT '服务机构负责人姓名',
`responsible_phone` varchar(32) NOT NULL COMMENT '负责人联系电话',
`manager_name` varchar(64) NOT NULL COMMENT '服务机构管理人姓名',
`manager_phone` varchar(32) NOT NULL COMMENT '管理人联系电话',
`contact_phone` varchar(32) NOT NULL COMMENT '服务机构紧急联系电话',
`mail_address` varchar(128) NOT NULL COMMENT '行政文书送达邮寄地址',
`create_date` datetime DEFAULT NULL COMMENT '服务机构设立日期',
`state` int(1) DEFAULT NULL COMMENT '状态',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='网约车平台公司服务机构';
-- ----------------------------
-- Records of tbl_base_info_company_service
-- ----------------------------
-- ----------------------------
-- Table structure for tbl_call_records
-- ----------------------------
DROP TABLE IF EXISTS `tbl_call_records`;
CREATE TABLE `tbl_call_records` (
`id` int(16) NOT NULL AUTO_INCREMENT,
`pool_key` varchar(64) DEFAULT NULL COMMENT '对应的号池Key',
`sub_id` varchar(64) DEFAULT NULL COMMENT '通话对应的三元组的绑定关系ID',
`call_id` varchar(64) DEFAULT NULL COMMENT '唯一标识一通通话记录的ID',
`phone_no` varchar(64) DEFAULT NULL COMMENT 'AXB中的A号码',
`secret_no` varchar(64) DEFAULT NULL COMMENT 'AXB中的X号码',
`peer_no` varchar(64) DEFAULT NULL COMMENT 'AXB中的B号码或者N号码',
`call_type` varchar(64) DEFAULT NULL COMMENT '呼叫类型\r\n0:主叫(phone_no打给peer_no);1:被叫(peer_no打给phone_no);2:短信发送;3:短信接收',
`call_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '呼叫动作开始时间',
`ring_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '对端手机振铃时间',
`start_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '对端接听时间',
`release_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '对端挂断时间,release_time - start_time 代表通话时长 如果结果为0,代表呼叫未接通',
`release_dir` varchar(4) DEFAULT NULL COMMENT '通话释放方向',
`release_cause` int(4) DEFAULT NULL COMMENT '释放原因\r\n1:未分配的号码\r\n2:无路由到指定的转接网\r\n3:无路由到目的地\r\n4:发送专用信息音\r\n16:正常的呼叫拆线\r\n17:用户忙\r\n18:用户未响应\r\n19:用户未应答\r\n20:用户缺席\r\n21:呼叫拒收\r\n22:号码改变\r\n27:目的地不可达\r\n28:无效的号码格式(地址不全)\r\n29:性能拒绝\r\n31:正常—未指定\r\n34: 无电路/通路可用\r\n42: 交换设备拥塞\r\n50:所请求的性能未预定\r\n53:CUG中限制去呼叫\r\n55: CUG中限制来呼叫\r\n57:承载能力无权\r\n58:承载能力目前不可用\r\n65:承载能力未实现\r\n69:所请求的性能未实现\r\n87:被叫用户不是CUG的成员\r\n88:不兼容的目的地\r\n90:不存在的CUG\r\n91:无效的转接网选择\r\n95:无效的消息,未指定\r\n97:消息类型不存在或未实现\r\n99:参数不存在或未实现\r\n102:定时器终了时恢复\r\n103:参数不存在或未实现—传递\r\n110:消息带有未被识别的参数—舍弃\r\n111:协议错误,未指定\r\n127:互通,未指定',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=116 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='通话记录表';
DROP TABLE IF EXISTS `tbl_car_base_info`;
CREATE TABLE `tbl_car_base_info` (
`id` int(11) NOT NULL COMMENT '车辆id',
`company_logo` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '公司标识',
`car_label` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '车辆厂牌',
`car_base_type` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '车辆类型',
`car_owner` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '车辆所有人',
`plate_color` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '车牌颜色',
`engine_number` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '发动机号电动机号',
`car_brain_plate` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '车脑品牌',
`car_brain_number` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '车脑编号',
`vin_number` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'vin码',
`register_time` date DEFAULT NULL COMMENT '注册日期',
`fuel_type` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '燃料类型',
`engine_capacity` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '发动机排量',
`car_img_file_number` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '车辆照片文件编号',
`transport_number` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '运输证字号',
`transport_issuing_authority` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '车辆运输证发证机构',
`business_area` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '经营区域',
`transport_certificate_validity_start` date DEFAULT NULL COMMENT '车辆运输证有效期起',
`transport_certificate_validity_end` date DEFAULT NULL COMMENT '车辆运输证有效期止',
`first_register_time` date DEFAULT NULL COMMENT '车辆初次登记日期',
`state_of_repair` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '车辆检修状态',
`next_annual_inspection_time` date DEFAULT NULL COMMENT '下次年检时间',
`annual_audit_status` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '年度审核状态',
`invoice_printing_equipment_number` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '发票打印设备序列号',
`gps_brand` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '卫星定位装置品牌',
`gps_model` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '型号',
`gps_imei` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'imei',
`gps_install_time` date DEFAULT NULL COMMENT '安装日期',
`report_time` date DEFAULT NULL COMMENT '报备日期',
`service_type` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '服务类型',
`charge_type_code` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '运价类型编码',
`car_invoice_img` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '车辆发票',
`quality_certificate_img` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '合格证',
`vehicle_license_img` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '行驶证',
`registration_certificate_img` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '登记证书',
`tax_payment_certificate_img` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '完税证明',
`transport_certificate_img` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '汽车运输证',
`other_img1` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '其他一',
`other_img2` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '其他二',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `tbl_car_bind_change_record`;
CREATE TABLE `tbl_car_bind_change_record` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`car_info_id` int(10) unsigned NOT NULL COMMENT '车辆ID',
`bind_tag` varchar(30) NOT NULL COMMENT '绑定类型',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录时间',
`bind_value` varchar(500) NOT NULL COMMENT '绑定内容',
`bind_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '0绑定,1解绑',
`operator_id` int(10) unsigned NOT NULL COMMENT '操作人ID',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=utf8 COMMENT='车辆绑定信息变更表';
DROP TABLE IF EXISTS `tbl_car_brand`;
CREATE TABLE `tbl_car_brand` (
`id` int(8) unsigned NOT NULL AUTO_INCREMENT,
`pid` int(8) unsigned NOT NULL DEFAULT '0' COMMENT '车辆品牌ID',
`brand` varchar(16) NOT NULL DEFAULT '' COMMENT '车辆品牌',
`model` varchar(30) NOT NULL DEFAULT '' COMMENT '车辆型号',
`seats` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '标准座位数量',
`is_delete` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:未删除,1:已删除',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=501 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
DROP TABLE IF EXISTS `tbl_car_dispatch_capacity_set`;
CREATE TABLE `tbl_car_dispatch_capacity_set` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`city_code` varchar(70) NOT NULL DEFAULT '' COMMENT '城市编码',
`car_service_period` tinyint(1) NOT NULL DEFAULT '0' COMMENT '车辆服务时段 1白天2夜晚',
`spare_driver_count` int(10) NOT NULL DEFAULT '0' COMMENT '空闲司机数量',
`operator_id` int(10) NOT NULL DEFAULT '0' COMMENT '操作人id',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='车辆调度运力设置';
DROP TABLE IF EXISTS `tbl_car_dispatch_direct_route_order_radius_set`;
CREATE TABLE `tbl_car_dispatch_direct_route_order_radius_set` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`city_code` varchar(70) NOT NULL DEFAULT '' COMMENT '城市编码',
`service_type_id` int(10) NOT NULL DEFAULT '0' COMMENT '服务类型id',
`direct_route_order_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '顺风单类型 1回家单 2接力单 3特殊时段预约单',
`direct_route_order_radius` int(10) NOT NULL DEFAULT '0' COMMENT '顺风单半径(公里)',
`is_delete` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除 0未删除 1已删除',
`operator_id` int(10) NOT NULL DEFAULT '0' COMMENT '操作人id',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='车辆调度顺风单半径设置';
DROP TABLE IF EXISTS `tbl_car_dispatch_distribute_interval_set`;
CREATE TABLE `tbl_car_dispatch_distribute_interval_set` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`city_code` varchar(70) NOT NULL DEFAULT '' COMMENT '城市编码',
`service_type_id` int(10) NOT NULL DEFAULT '0' COMMENT '服务类型id',
`car_service_before_interval` int(10) NOT NULL DEFAULT '0' COMMENT '用车服务前间隔(分钟)',
`car_service_after_interval` int(10) NOT NULL DEFAULT '0' COMMENT '用车服务后间隔(分钟)',
`operator_id` int(10) NOT NULL DEFAULT '0' COMMENT '操作人id',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='车辆调度派单间隔设置';
DROP TABLE IF EXISTS `tbl_car_dispatch_distribute_radius_set`;
CREATE TABLE `tbl_car_dispatch_distribute_radius_set` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`city_code` varchar(70) NOT NULL DEFAULT '' COMMENT '城市编码',
`service_type_id` int(10) NOT NULL DEFAULT '0' COMMENT '服务类型id',
`min_radius` int(10) NOT NULL DEFAULT '0' COMMENT '最小派单半径(公里)',
`min_radius_first_push_driver_count` int(10) NOT NULL DEFAULT '0' COMMENT '最小派单半径首次推送司机数量',
`max_radius` int(10) NOT NULL DEFAULT '0' COMMENT '最大派单半径(公里)',
`max_radius_first_push_driver_count` int(10) NOT NULL DEFAULT '0' COMMENT '最大派单半径首次推送司机数量',
`operator_id` int(10) NOT NULL DEFAULT '0' COMMENT '操作人id',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='车辆调度派单半径设置';
DROP TABLE IF EXISTS `tbl_car_dispatch_distribute_set`;
CREATE TABLE `tbl_car_dispatch_distribute_set` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`city_code` varchar(70) NOT NULL DEFAULT '' COMMENT '城市编码',
`is_force_distribute` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否开启强派 0不开启 1开启',
`operator_id` int(10) NOT NULL DEFAULT '0' COMMENT '操作人id',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='车辆调度派发设置';
DROP TABLE IF EXISTS `tbl_car_dispatch_special_period_set`;
CREATE TABLE `tbl_car_dispatch_special_period_set` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`city_code` varchar(70) NOT NULL DEFAULT '' COMMENT '城市编码',
`service_type_id` int(10) NOT NULL,
`time_period` varchar(255) NOT NULL DEFAULT '' COMMENT '时段设置',
`is_delete` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除 0未删除 1已删除',
`operator_id` int(10) NOT NULL DEFAULT '0' COMMENT '操作人id',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='车辆调度特殊时段设置';
DROP TABLE IF EXISTS `tbl_car_dispatch_time_threshold_set`;
CREATE TABLE `tbl_car_dispatch_time_threshold_set` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`city_code` varchar(70) NOT NULL DEFAULT '' COMMENT '城市编码',
`service_type_id` int(10) NOT NULL DEFAULT '0' COMMENT '服务类型id',
`time_threshold_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '时间阈值类型 1开启立即用车派单逻辑 2预约用车待派订单开启强派模式',
`time_threshold` int(10) NOT NULL DEFAULT '0' COMMENT '时间阈值(分钟)',
`operator_id` int(10) DEFAULT '0' COMMENT '操作人id',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='车辆调度时间阈值设置';
DROP TABLE IF EXISTS `tbl_car_driver_bind_record`;
CREATE TABLE `tbl_car_driver_bind_record` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`driver_info_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '司机ID',
`car_info_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '车辆ID',
`operator_user` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'system',
`type` int(11) NOT NULL COMMENT '1绑定0解绑',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`bind_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '绑定时间',
`unbind_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '解绑时间',
`total_mile` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '车辆总里程',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `tbl_car_info`;
CREATE TABLE `tbl_car_info` (
`id` int(10) NOT NULL AUTO_INCREMENT COMMENT '车辆id',
`plate_number` varchar(16) NOT NULL DEFAULT '' COMMENT '车牌号',
`operation_status` int(2) NOT NULL DEFAULT '0' COMMENT '运营状态:-1,删除 0,上架 1,下架 2,待整备',
`publish_time` datetime DEFAULT NULL COMMENT '上架时间',
`full_name` varchar(64) NOT NULL DEFAULT '' COMMENT '车辆全名',
`color` varchar(30) NOT NULL DEFAULT '' COMMENT '车身颜色',
`car_img` varchar(256) NOT NULL DEFAULT '' COMMENT '汽车图片',
`city_code` varchar(32) NOT NULL DEFAULT '' COMMENT '城市',
`car_type_id` int(16) unsigned NOT NULL DEFAULT '0' COMMENT '车辆类型',
`car_level_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '车辆级别',
`regist_date` datetime DEFAULT NULL COMMENT '上牌日期',
`insurance_start_date` datetime DEFAULT NULL COMMENT '保险生效日期',
`insurance_end_date` datetime DEFAULT NULL COMMENT '保险失效日期',
`annual_end_date` datetime DEFAULT NULL COMMENT '年检到期日期',
`car_license_img` varchar(256) NOT NULL DEFAULT '' COMMENT '行驶本图片地址',
`is_free_order` int(2) DEFAULT '0' COMMENT '是否开启顺风单0:停用,1:启用',
`remark` varchar(256) NOT NULL DEFAULT '' COMMENT '备注',
`use_status` int(2) NOT NULL DEFAULT '0' COMMENT '启用停用状态,0:停用,1:启用',
`large_screen_device_code` varchar(256) NOT NULL DEFAULT '' COMMENT '大屏编号',
`large_screen_device_brand` varchar(64) NOT NULL DEFAULT '' COMMENT '大屏品牌名称',
`car_screen_device_code` varchar(256) NOT NULL DEFAULT '' COMMENT '车机/脑设备号',
`car_screen_device_brand` varchar(64) NOT NULL DEFAULT '' COMMENT '车机/脑品牌名称',
`operator_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '操作人ID',
`total_mile` int(11) NOT NULL DEFAULT '0' COMMENT '行驶总里程单位:km',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
DROP TABLE IF EXISTS `tbl_car_level`;
CREATE TABLE `tbl_car_level` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`label` varchar(30) NOT NULL DEFAULT '' COMMENT '车辆级别标签',
`icon` varchar(500) NOT NULL DEFAULT '' COMMENT '车型图标',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`operator_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '操作人ID',
`enable` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '状态:0未启用1启用',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='车辆级别列表';
DROP TABLE IF EXISTS `tbl_car_machine_info_record`;
CREATE TABLE `tbl_car_machine_info_record` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`car_device_code` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '设备唯一号',
`mileage` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '累计总里程,km',
`sub_mileage` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '累计分里程',
`is_ns` varchar(8) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '南纬或北纬 n或s',
`latitude` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '纬度',
`is_ew` varchar(8) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '是否东经西经 e或w',
`longitude` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '经度',
`qf` int(2) NOT NULL DEFAULT '0' COMMENT '质量因子',
`satellite_num` int(8) NOT NULL DEFAULT '0' COMMENT '可使用卫星数量',
`accuracy` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '精度,米',
`gps_accuracy_status` int(2) NOT NULL DEFAULT '0' COMMENT '卫星信号强度',
`elevation` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '海拔',
`direction` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '方向',
`surplus_distance` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '剩余续航里程',
`parking_sw` int(2) NOT NULL DEFAULT '0' COMMENT '手刹开关',
`key_pos` int(2) NOT NULL DEFAULT '0' COMMENT '钥匙位置',
`sw_gear` int(2) NOT NULL DEFAULT '0' COMMENT '档位信号',
`brk_sta` int(2) NOT NULL DEFAULT '0' COMMENT '制动踏板位置',
`car_speed` int(10) NOT NULL DEFAULT '0' COMMENT '瞬时车速',
`ev_soc` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '剩余电量',
`limt_speed` int(10) NOT NULL DEFAULT '0' COMMENT '整车最大车速',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-- ----------------------------
-- Records of tbl_car_machine_info_record
-- ----------------------------
-- ----------------------------
-- Table structure for tbl_car_screen_driver
-- ----------------------------
DROP TABLE IF EXISTS `tbl_car_screen_driver`;
CREATE TABLE `tbl_car_screen_driver` (
`id` int(16) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`driver_id` int(16) NOT NULL COMMENT '司机id',
`car_screen_code` varchar(128) NOT NULL DEFAULT '' COMMENT '汽车屏幕唯一码',
`login_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '登录时间',
`logout_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '登出时间',
`login_status` int(2) NOT NULL COMMENT '登录状态:1:登录,2:退出登录',
`repair_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '修复登出时间',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
-- ----------------------------
-- Records of tbl_car_screen_driver
-- ----------------------------
-- ----------------------------
-- Table structure for tbl_car_type
-- ----------------------------
DROP TABLE IF EXISTS `tbl_car_type`;
CREATE TABLE `tbl_car_type` (
`id` int(16) unsigned NOT NULL AUTO_INCREMENT,
`brand` varchar(30) NOT NULL DEFAULT '' COMMENT '品牌',
`model` varchar(30) NOT NULL DEFAULT '' COMMENT '型号',
`seats` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '座位数量',
`city` varchar(30) NOT NULL DEFAULT '' COMMENT '城市',
`type_desc` varchar(60) NOT NULL DEFAULT '',
`img_url` varchar(500) NOT NULL DEFAULT '' COMMENT '车型图片地址',
`status` int(2) NOT NULL DEFAULT '0' COMMENT '0:未启用,1:已启用',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '录入时间',
`update_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
`operator_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '操作人',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
DROP TABLE IF EXISTS `tbl_channel`;
CREATE TABLE `tbl_channel` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`channel_name` varchar(64) NOT NULL COMMENT '渠道名称',
`channel_status` int(2) NOT NULL DEFAULT '0' COMMENT '渠道开启暂停状态 1开启 0暂停',
`operator_id` int(11) NOT NULL COMMENT '操作人id',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=300005 DEFAULT CHARSET=utf8 COMMENT='渠道管理表';
DROP TABLE IF EXISTS `tbl_charge_rule`;
CREATE TABLE `tbl_charge_rule` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`city_code` varchar(32) NOT NULL DEFAULT '' COMMENT '城市编码',
`service_type_id` int(10) NOT NULL COMMENT '服务类型',
`channel_id` int(10) NOT NULL COMMENT '渠道名称',
`car_level_id` int(10) NOT NULL COMMENT '车辆级别',
`lowest_price` double(10,2) NOT NULL COMMENT '基础价',
`base_price` double(10,2) NOT NULL COMMENT '起步价',
`base_kilo` double(10,2) NOT NULL COMMENT '基础价格包含公里数',
`base_minutes` double(10,2) NOT NULL COMMENT '基础价格包含时长数(分钟)',
`per_kilo_price` double(10,2) NOT NULL COMMENT '超公里单价(每公里单价)',
`per_minute_price` double(10,2) NOT NULL COMMENT '超时间单价(每分钟单价)',
`beyond_start_kilo` double(10,2) NOT NULL COMMENT '远途起算公里',
`beyond_per_kilo_price` double(10,2) NOT NULL COMMENT '远途单价',
`night_start` time DEFAULT NULL COMMENT '夜间时间段开始',
`night_end` time DEFAULT NULL COMMENT '夜间时间段结束',
`night_per_kilo_price` double(10,2) DEFAULT NULL COMMENT '夜间超公里加收单价',
`night_per_minute_price` double(10,2) DEFAULT NULL COMMENT '夜间超时间加收单价',
`effective_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP COMMENT '生效时间',
`active_status` int(11) NOT NULL DEFAULT '0' COMMENT '生效状态 0已失效 1未失效',
`is_unuse` int(11) NOT NULL DEFAULT '0' COMMENT '是否不可用 0可用 1不可用',
`creator_id` int(10) NOT NULL DEFAULT '0' COMMENT '创建人id',
`operator_id` int(10) NOT NULL DEFAULT '0' COMMENT '操作人id',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'create_time',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'update_time',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='计费规则表';
DROP TABLE IF EXISTS `tbl_charge_rule_detail`;
CREATE TABLE `tbl_charge_rule_detail` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`rule_id` int(10) NOT NULL,
`start` int(2) NOT NULL COMMENT '时间段开始',
`end` int(2) NOT NULL COMMENT '时间段结束',
`per_kilo_price` double(10,2) NOT NULL COMMENT '超公里单价',
`per_minute_price` double(10,2) NOT NULL COMMENT '超时间单价',
`is_delete` int(10) NOT NULL DEFAULT '0' COMMENT '是否删除 0未删除 1已删除',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='计费规则时间段表';
DROP TABLE IF EXISTS `tbl_city`;
CREATE TABLE `tbl_city` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`city_name` varchar(64) NOT NULL COMMENT '城市名称',
`city_code` varchar(32) NOT NULL COMMENT '城市编码',
`city_longitude_latitude` varchar(64) NOT NULL COMMENT '城市中心经纬度',
`order_risk_top` int(4) NOT NULL COMMENT '下单风险上限值',
`city_status` int(2) NOT NULL DEFAULT '0' COMMENT '是否开通 0未开通 1开通',
`operator_id` int(11) NOT NULL COMMENT '操作人id',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `city_code` (`city_code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='城市表';
DROP TABLE IF EXISTS `tbl_coupon`;
CREATE TABLE `tbl_coupon` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '优惠券id',
`status` int(4) unsigned NOT NULL DEFAULT '1' COMMENT '优惠券状态 0:禁用, 1:启用',
`coupon_name` varchar(60) NOT NULL COMMENT '优惠券名称',
`coupon_desc` varchar(250) NOT NULL DEFAULT '' COMMENT '优惠券描述',
`coupon_type` int(4) unsigned NOT NULL DEFAULT '0' COMMENT '优惠方式 1:现金券, 3:专项券-免费送车券, 4:专项券-免费还车券 2:折扣券',
`coupon_class_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '优惠券类型ID',
`coupon_class_name` varchar(60) NOT NULL DEFAULT '' COMMENT '优惠券类型名称',
`get_method` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '1,主动发放. 2,用户获取',
`minimum_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '订单最低金额',
`reduction_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '减免金额 仅现金券有此项',
`maximum_amount` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '最高抵扣金额',
`discount` decimal(4,2) NOT NULL DEFAULT '0.00' COMMENT '折扣比例',
`effective_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '有效期类型 1:天数 ,2:时间段',
`effective_day` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '有效期天数',
`enable_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '有效期开始时间',
`expire_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '有效期结束时间',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
`create_user` varchar(30) NOT NULL DEFAULT '' COMMENT '创建用户',
`function_type` int(4) NOT NULL DEFAULT '1' COMMENT '功能类型 1:市场活动, 2:订单赔付',
`total_number` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '总数量',
`get_number` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '已获取',
`used_number` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '已使用',
`operator_id` int(10) unsigned DEFAULT '0' COMMENT '操作人ID',
PRIMARY KEY (`id`),
KEY `inx_fuction_type` (`function_type`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='优惠券配置表';
DROP TABLE IF EXISTS `tbl_coupon_activity`;
CREATE TABLE `tbl_coupon_activity` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`activity_no` varchar(30) NOT NULL DEFAULT '' COMMENT '方案编号',
`activity_name` varchar(30) NOT NULL DEFAULT '' COMMENT '方案名称',
`enable_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '活动开始时间',
`expire_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '过期时间',
`activity_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '优惠形式',
`coupon_rule` varchar(250) NOT NULL DEFAULT '' COMMENT '领券规则',
`activity_desc` varchar(250) NOT NULL DEFAULT '' COMMENT '活动描述',
`get_times` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '领券次数',
`send_times` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '发送次数',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`operator_id` int(10) NOT NULL DEFAULT '0' COMMENT '最后变更人id',
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '0冻结1正常',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='营销方案表';
DROP TABLE IF EXISTS `tbl_coupon_class`;
CREATE TABLE `tbl_coupon_class` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`coupon_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '优惠方式:1现金券,2折扣券',
`coupon_name` varchar(30) NOT NULL DEFAULT '' COMMENT '优惠券名称',
`reduction_amount` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '抵扣金额',
`discount` decimal(4,2) NOT NULL DEFAULT '0.00' COMMENT '折扣比例(8, 7.5)',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`operator_id` int(10) NOT NULL DEFAULT '0' COMMENT '最后修改人id',
`is_pause` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '暂停:0否1是',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COMMENT='优惠券类型表';
DROP TABLE IF EXISTS `tbl_coupon_conditions`;
CREATE TABLE `tbl_coupon_conditions` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`coupon_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '优惠券ID',
`hour_set` varchar(80) NOT NULL DEFAULT '' COMMENT '小时集合',
`week_set` varchar(15) NOT NULL DEFAULT '' COMMENT '周集合',
`date_set` varchar(80) NOT NULL DEFAULT '' COMMENT '日期集合',
`city_set` varchar(1023) NOT NULL DEFAULT '' COMMENT '城市集合',
`car_set` varchar(60) NOT NULL DEFAULT '' COMMENT '车辆类型集合',
`service_set` varchar(30) NOT NULL DEFAULT '' COMMENT '服务集合',
`level_set` varchar(30) NOT NULL DEFAULT '',
`hour_raw` varchar(120) NOT NULL DEFAULT '' COMMENT '时段原始数据',
`date_raw` varchar(120) NOT NULL DEFAULT '' COMMENT '日期原始数据',
`create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COMMENT='优惠券使用条件限制表';
DROP TABLE IF EXISTS `tbl_coupon_send_info`;
CREATE TABLE `tbl_coupon_send_info` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`send_num` int(11) NOT NULL COMMENT '发放数量',
`start_time` datetime NOT NULL COMMENT '开始时间',
`end_time` datetime NOT NULL COMMENT '结束时间',
`operator_user` varchar(64) NOT NULL COMMENT '操作用户',
`get_num` int(11) NOT NULL COMMENT '领取数量',
`use_num` int(11) NOT NULL COMMENT '使用数量',
`coupon_id` int(11) NOT NULL,
`status` int(11) NOT NULL,
`img_url` varchar(128) NOT NULL,
`message` varchar(256) NOT NULL,
`send_list` varchar(5120) NOT NULL,
`send_time` datetime NOT NULL,
`send_status` int(11) NOT NULL,
`description` varchar(1024) NOT NULL COMMENT '优惠券文案',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
DROP TABLE IF EXISTS `tbl_coupon_task`;
CREATE TABLE `tbl_coupon_task` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`coupon_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '优惠券ID',
`coupon_name` varchar(30) NOT NULL DEFAULT '' COMMENT '优惠券名称',
`number` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT '发放数量',
`task_tag` varchar(30) NOT NULL DEFAULT '' COMMENT '任务标签,用于区分不同批次',
`people_tag_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '人群模板ID',
`task_target` varchar(1280) NOT NULL DEFAULT '' COMMENT '任务目标,最多100个手机号',
`app_tpl_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'app文案模板ID',
`sms_tpl_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '短信文案模板ID',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`operator_id` int(10) NOT NULL DEFAULT '0' COMMENT '操作人id',
`task_status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '任务状态:0未开始1进行中2完成',
`start_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`is_cancel` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否终止:0否,1是',
`plan_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '计划发送时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8 COMMENT='优惠券发送任务表';
DROP TABLE IF EXISTS `tbl_device_blacklist`;
CREATE TABLE `tbl_device_blacklist` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`device_type` char(1) NOT NULL DEFAULT '' COMMENT '1 android 2 ios3 other',
`device_code` varchar(64) NOT NULL DEFAULT '' COMMENT '手机设备串码',
`last_login_time` timestamp NULL DEFAULT NULL COMMENT '最后一次登录时间',
`is_release` tinyint(11) unsigned NOT NULL DEFAULT '0' COMMENT '1 解禁,0 未解禁',
`phones` mediumtext COMMENT '欠款手机号',
`memo` mediumtext NOT NULL COMMENT '备注',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'create',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'update',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='设备黑名单';
DROP TABLE IF EXISTS `tbl_dictionary`;
CREATE TABLE `tbl_dictionary` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`dic_parentid` int(10) NOT NULL COMMENT '父id',
`dic_type` varchar(100) NOT NULL DEFAULT '' COMMENT '类型',
`dic_name` varchar(50) NOT NULL DEFAULT '',
`dic_value` varchar(200) NOT NULL DEFAULT '' COMMENT '值',
`dic_desc` varchar(200) NOT NULL DEFAULT '' COMMENT '描述',
`dic_order` int(5) unsigned NOT NULL COMMENT '排序',
`dic_status` varchar(2) NOT NULL DEFAULT '',
PRIMARY KEY (`id`) USING BTREE,
KEY `typeindex` (`dic_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='字典表';
-- ----------------------------
-- Records of tbl_dictionary
-- ----------------------------
-- ----------------------------
-- Table structure for tbl_driver_address
-- ----------------------------
DROP TABLE IF EXISTS `tbl_driver_address`;
CREATE TABLE `tbl_driver_address` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`driver_id` int(11) unsigned NOT NULL COMMENT '司机id',
`address` varchar(120) NOT NULL DEFAULT '' COMMENT '详细地址',
`address_longitude` varchar(32) NOT NULL DEFAULT '' COMMENT '地址经度',
`address_latitude` varchar(32) NOT NULL DEFAULT '' COMMENT '地址纬度',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '编辑时间',
`tag` varchar(15) NOT NULL DEFAULT '' COMMENT '标签',
`is_default` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否默认地址',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COMMENT='司机顺风地址记录表';
DROP TABLE IF EXISTS `tbl_driver_advice`;
CREATE TABLE `tbl_driver_advice` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`driver_id` int(10) NOT NULL DEFAULT '0' COMMENT '司机id',
`advice_type` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '反馈类型',
`advice_desc` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '反馈内容',
`phone` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '司机电话',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `tbl_driver_base_info`;
CREATE TABLE `tbl_driver_base_info` (
`id` int(11) NOT NULL,
`mobile_operator` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '手机运营商',
`company_logo` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '公司标识',
`administrative_code` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '注册行政地区代码',
`birthday` date DEFAULT NULL COMMENT '驾驶员出生日期',
`country` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '国籍',
`national` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '驾驶员民族',
`driving_licence_number` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '驾驶证编号',
`marital_status` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '婚姻状况',
`foreign_language_ability` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '外语能力',
`app_version` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '使用APP版本号',
`map_type` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '使用地图类型',
`education_background` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '驾驶员学历',
`household_registration_authority` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '户口 登记机关名称',
`registered_permanent_residence_address` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '户口 住址',
`address` varchar(736) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '现居地址',
`address_longitude` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '现居地址经度',
`address_latitude` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '现居地址纬度',
`driver_img_file_number` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '驾驶员照片文件编号',
`driver_license` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '机动车驾驶员证',
`driver_license_scan_copy_number` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '机动车驾驶证扫描件文件编号',
`driving_type` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '准驾车型',
`first_get_driver_license_date` datetime DEFAULT NULL COMMENT '初次领取驾驶证日期',
`driver_license_validity_start` datetime DEFAULT NULL COMMENT '驾驶证有效期起',
`driver_license_validity_end` datetime DEFAULT NULL COMMENT '驾驶证有效期止',
`is_taxi_driver` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '是否巡游出租车驾驶员',
`network_reservation_taxi_driver_license_number` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '网络预约出租汽车驾驶员证号',
`network_reservation_taxi_driver_license_issuing_agencies` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '网络预约出租汽车驾驶员证发证机构',
`certificate_issuing_date` datetime DEFAULT NULL COMMENT '资格证发证日期',
`first_qualification_date` datetime DEFAULT NULL COMMENT '初次领取资格证日期',
`qualification_certificate_validity_start` datetime DEFAULT NULL COMMENT '资格证有效期起',
`qualification_certificate_validity_end` datetime DEFAULT NULL COMMENT '资格证有效期止',
`reported_date` datetime DEFAULT NULL COMMENT '报备日期',
`is_full_time_driver` int(11) NOT NULL DEFAULT '0' COMMENT '是否专职驾驶员',
`is_in_driver_blacklist` int(11) NOT NULL DEFAULT '0' COMMENT '是否在黑名单',
`service_type` int(11) NOT NULL DEFAULT '0' COMMENT '服务类型',
`company` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '驾驶员合同(或协议)签署公司',
`contract_start_date` datetime DEFAULT NULL COMMENT '合同开始时间',
`contract_end_date` datetime DEFAULT NULL COMMENT '合同结束时间',
`emergency_contact` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '紧急联系人',
`emergency_contact_phone_number` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '紧急联系人电话',
`emergency_contact_address` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '紧急联系人地址',
`training_courses` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '培训课名称',
`training_courses_date` datetime DEFAULT NULL COMMENT '培训课程日期',
`training_courses_start_date` datetime DEFAULT NULL COMMENT '培训开始日期',
`training_courses_end_date` datetime DEFAULT NULL COMMENT '培训结束日期',
`training_courses_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '培训时长',
`bank_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '开户行',
`bank_card_number` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '银行卡号',
`note` varchar(64) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
`qualification_certificate_img` varchar(256) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '从业资格证照片',
`other_img1` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '其他一',
`other_img2` varchar(128) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '其他二',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `tbl_driver_bind_change_record`;
CREATE TABLE `tbl_driver_bind_change_record` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`driver_info_id` int(10) unsigned NOT NULL COMMENT '司机ID',
`bind_tag` varchar(30) NOT NULL COMMENT '绑定类型',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '记录时间',
`bind_value` varchar(500) NOT NULL COMMENT '绑定内容',
`bind_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '0绑定,1解绑',
`operator_id` int(10) unsigned NOT NULL COMMENT '操作人ID',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=95 DEFAULT CHARSET=utf8 COMMENT='司机绑定信息变更表';
DROP TABLE IF EXISTS `tbl_driver_income_detail`;
CREATE TABLE `tbl_driver_income_detail` (
`id` int(16) unsigned NOT NULL AUTO_INCREMENT,
`driver_info_id` int(16) unsigned NOT NULL DEFAULT '0',
`order_no` varchar(32) NOT NULL DEFAULT '',
`order_money` decimal(8,2) NOT NULL DEFAULT '0.00',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`money` decimal(8,2) NOT NULL DEFAULT '0.00',
`driver_ratio` decimal(8,2) NOT NULL DEFAULT '0.00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=240 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
DROP TABLE IF EXISTS `tbl_driver_info`;
CREATE TABLE `tbl_driver_info` (
`id` int(16) unsigned NOT NULL AUTO_INCREMENT,
`phone_number` varchar(32) NOT NULL DEFAULT '' COMMENT '司机手机号',
`driver_leader` int(11) unsigned DEFAULT '0' COMMENT '司机主管',
`driver_name` varchar(16) NOT NULL DEFAULT '' COMMENT '司机姓名',
`register_time` datetime DEFAULT NULL COMMENT '注册时间',
`balance` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '余额',
`gender` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '性别',
`car_id` int(16) unsigned DEFAULT NULL COMMENT '车辆id',
`is_following` int(1) NOT NULL DEFAULT '0' COMMENT '是否是顺风单0否 1是',
`work_status` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '司机工作状态\r\n0:非出车状态,\r\n1:出车,未接订单,\r\n2:出车,接到订单,\r\n3:暂停接单',
`head_img` varchar(256) NOT NULL DEFAULT '' COMMENT '司机头像',
`city_code` varchar(8) NOT NULL DEFAULT '' COMMENT '城市代码',
`bind_time` datetime DEFAULT NULL COMMENT '绑定时间',
`use_status` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '启用停用状态,0:停用,1:启用',
`cs_work_status` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '车机工作状态\r\n0:车机未登录登录\r\n1:车机登录\r\n2:车机听单\r\n3:车机暂停听单\r\n4:车机收车\r\n\r\n',
`sign_status` int(2) NOT NULL DEFAULT '1' COMMENT '1:已签约,0:已解约',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='司机信息表';
DROP TABLE IF EXISTS `tbl_driver_licence_info`;
CREATE TABLE `tbl_driver_licence_info` (
`id` int(16) unsigned NOT NULL AUTO_INCREMENT COMMENT '审核记录id',
`driver_id` int(16) NOT NULL DEFAULT '0' COMMENT '司机id',
`main_driving_license` varchar(256) NOT NULL DEFAULT '' COMMENT '驾照主页照片地址',
`vice_driving_license` varchar(256) NOT NULL DEFAULT '' COMMENT '驾照副页照片地址',
`all_driving_license` varchar(256) NOT NULL DEFAULT '' COMMENT '驾照正副页照片地址',
`group_driving_license` varchar(256) NOT NULL DEFAULT '' COMMENT '手持驾照照片地址',
`identity_card_id` varchar(32) NOT NULL DEFAULT '' COMMENT '身份证',
`main_idcard_license` varchar(256) NOT NULL DEFAULT '' COMMENT '身份证正面照',
`vice_idcard_license` varchar(256) NOT NULL DEFAULT '' COMMENT '身份证副页照片地址',
`group_idcard_license` varchar(256) NOT NULL DEFAULT '' COMMENT '手持身份证照片',
`plate_number` varchar(16) NOT NULL DEFAULT '' COMMENT '车牌号',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
KEY `fk_reference_2` (`driver_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='司机驾驶证信息';
DROP TABLE IF EXISTS `tbl_driver_message`;
CREATE TABLE `tbl_driver_message` (
`id` int(16) unsigned NOT NULL AUTO_INCREMENT,
`passenger_id` int(16) unsigned NOT NULL DEFAULT '0',
`driver_id` int(16) NOT NULL DEFAULT '0',
`content` varchar(256) NOT NULL DEFAULT '',
`is_delete` int(2) NOT NULL DEFAULT '0' COMMENT '1:删除,0:未删除',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`if_success` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '是否发送成功',
`order_id` varchar(32) NOT NULL DEFAULT '' COMMENT '订单id',
`message_type` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '消息类型',
`message_channel` int(2) unsigned NOT NULL DEFAULT '0' COMMENT '1:极光推送,2:短信',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
DROP TABLE IF EXISTS `tbl_driver_order_message_statistical`;
CREATE TABLE `tbl_driver_order_message_statistical` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`driver_id` int(10) NOT NULL COMMENT '司机Id',
`driving_licence_number` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '机动车驾驶证编号',
`cycle` varchar(255) NOT NULL COMMENT '统计周期 格式为YYYYMM',
`order_count` int(10) NOT NULL COMMENT '完成订单数',
`traffic_violations_count` int(32) NOT NULL DEFAULT '0' COMMENT '交通违章次数',
`complained_count` int(32) NOT NULL DEFAULT '0' COMMENT '被投诉次数',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='司机订单及其它信息统计';
DROP TABLE IF EXISTS `tbl_driver_punish`;
CREATE TABLE `tbl_driver_punish` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`driver_id` int(10) NOT NULL COMMENT '司机id',
`punish_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '处罚时间',
`punish_reason` varchar(128) NOT NULL COMMENT '处罚原因',
`punish_result` varchar(128) NOT NULL COMMENT '处罚结果',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='司机处罚表';
DROP TABLE IF EXISTS `tbl_driver_rate`;
CREATE TABLE `tbl_driver_rate` (
`id` int(10) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`driver_id` int(10) NOT NULL COMMENT '司机ID',
`grade` int(2) NOT NULL DEFAULT '0' COMMENT '等级',
`test_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '考核日期',
`test_department` varchar(255) NOT NULL DEFAULT '' COMMENT '考核机构',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='驾驶员荣誉信息表';
DROP TABLE IF EXISTS `tbl_driver_work_time`;
CREATE TABLE `tbl_driver_work_time` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`driver_id` int(10) unsigned NOT NULL COMMENT '司机id',
`work_start` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP COMMENT '工作开始时间',
`work_end` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '工作结束时间',
`work_duration` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '此次工作时长',
`work_day` date NOT NULL DEFAULT '0000-00-00' COMMENT '工作日',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='司机工作时间';
DROP TABLE IF EXISTS `tbl_dynamic_discount_city`;
CREATE TABLE `tbl_dynamic_discount_city` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`dynamic_discount_rule_id` int(10) NOT NULL DEFAULT '0' COMMENT '动态折扣关联id',
`city_code` varchar(32) NOT NULL DEFAULT '' COMMENT '城市编码',
`is_delete` int(1) NOT NULL DEFAULT '0' COMMENT '是否删除 0不删除 1删除',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='动态调价城市表';
DROP TABLE IF EXISTS `tbl_dynamic_discount_info`;
CREATE TABLE `tbl_dynamic_discount_info` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`dynamic_discount_rule_id` int(10) NOT NULL DEFAULT '0' COMMENT '动态折扣关联id',
`km` double(10,2) NOT NULL DEFAULT '0.00' COMMENT '里程',
`discount` double(3,2) NOT NULL DEFAULT '0.00' COMMENT '折扣',
`is_delete` int(1) NOT NULL DEFAULT '0' COMMENT '是否删除 0不删除 1删除',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='动态折扣信息表';
DROP TABLE IF EXISTS `tbl_dynamic_discount_rule`;
CREATE TABLE `tbl_dynamic_discount_rule` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`service_type` varchar(255) NOT NULL DEFAULT '' COMMENT '服务类型',
`car_level` varchar(255) NOT NULL DEFAULT '' COMMENT '车辆级别',
`time_set` varchar(255) NOT NULL DEFAULT '' COMMENT '时段设置',
`date_type` int(1) NOT NULL DEFAULT '0' COMMENT '日期类型 1星期 2特殊日期',
`week_set` varchar(255) NOT NULL DEFAULT '' COMMENT '星期设置',
`special_date_set` varchar(255) NOT NULL DEFAULT '' COMMENT '特殊日期设置',