-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
caifeng.sql
2128 lines (2026 loc) · 149 KB
/
caifeng.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
/*
Navicat Premium Data Transfer
Source Server : 才风智慧阿里云
Source Server Type : MySQL
Source Server Version : 50742
Source Host : 47.100.11.151:3306
Source Schema : caifeng
Target Server Type : MySQL
Target Server Version : 50742
File Encoding : 65001
Date: 21/11/2023 20:20:20
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for cf_access_token_manage
-- ----------------------------
DROP TABLE IF EXISTS `cf_access_token_manage`;
CREATE TABLE `cf_access_token_manage` (
`id` bigint(20) UNSIGNED NOT NULL,
`appid` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'appid',
`token_value` varchar(2048) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'token值',
`application_scenes` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '应用场景(wx_web-微信公众号/wx_mp-微信小程序/wx_app-微信app/ali_web-阿里公众号/ali_mp-阿里小程序/ali_app-阿里app)',
`expired_time` bigint(20) UNSIGNED NOT NULL COMMENT '过期时间',
`token_notes` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'token备注',
PRIMARY KEY (`id`) USING BTREE,
INDEX `appid`(`appid`, `application_scenes`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '第三方平台token管理表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_account
-- ----------------------------
DROP TABLE IF EXISTS `cf_account`;
CREATE TABLE `cf_account` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`uid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户id',
`score_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '积分类型',
`balance` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '余额',
`freeze` bigint(19) UNSIGNED NOT NULL DEFAULT 0 COMMENT '冻结解封时间',
`type` tinyint(3) NOT NULL DEFAULT 0 COMMENT '账号类型(0-个人/1-商户/2-企业机构)',
`create_time` bigint(19) UNSIGNED NOT NULL COMMENT '开户时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '账户表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_account_log
-- ----------------------------
DROP TABLE IF EXISTS `cf_account_log`;
CREATE TABLE `cf_account_log` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`account_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '账号',
`value` decimal(10, 2) NOT NULL COMMENT '变化值',
`source_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '变动来源id',
`create_time` bigint(19) UNSIGNED NOT NULL COMMENT '创建时间',
`score_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '积分类型',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '积分变动记录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_ad
-- ----------------------------
DROP TABLE IF EXISTS `cf_ad`;
CREATE TABLE `cf_ad` (
`id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`title` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '广告标题',
`subtitle` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '广告副标题',
`cover` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '封面',
`platform` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '平台(web-网页/wxmp-微信小程序/app-手机应用)',
`material_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '素材类型(image-图片/video-视频)',
`sort_index` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序',
`source_address` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '源地址',
`appid` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '第三方应用id',
`show_counts` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '展示次数',
`click_counts` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '点击次数',
`start_time` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '开始投放时间',
`end_time` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '结束投放时间',
`create_time` bigint(20) UNSIGNED NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '广告表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_ad_links
-- ----------------------------
DROP TABLE IF EXISTS `cf_ad_links`;
CREATE TABLE `cf_ad_links` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`ad_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '广告id',
`scenes` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '场景(carpark-bind-car 车牌绑定页面/carpark-order 停车账单结算页面/pay-success 支付成功页面)',
`platform` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '平台(web-网页/wxmp-微信小程序/app-手机应用)',
`carrier_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '载体id',
`sort_index` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '广告排序',
`start_time` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '开始投放时间',
`end_time` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '结束投放时间',
`show_counts` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '展示次数',
`click_counts` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '点击次数',
`create_time` bigint(20) UNSIGNED NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `ad_id`(`ad_id`, `scenes`, `platform`, `start_time`, `end_time`, `sort_index`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '广告关联表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_app_version_log
-- ----------------------------
DROP TABLE IF EXISTS `cf_app_version_log`;
CREATE TABLE `cf_app_version_log` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`platform` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '应用平台,例如android,ios等',
`version_number` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '版本号',
`level` tinyint(3) UNSIGNED NOT NULL COMMENT '级别(0-普通更新/1-推荐更新/2-强制更新)',
`note` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '版本描述',
`publish_time` bigint(19) UNSIGNED NOT NULL COMMENT '发布时间',
`url` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'app安装包下载地址',
PRIMARY KEY (`id`) USING BTREE,
INDEX `platform`(`platform`, `version_number`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'app版本发行记录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_areas
-- ----------------------------
DROP TABLE IF EXISTS `cf_areas`;
CREATE TABLE `cf_areas` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`parent_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`short_name` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`level_type` int(11) UNSIGNED NOT NULL,
`city_code` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`zip_code` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`merger_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`position_x` decimal(16, 12) NOT NULL,
`position_y` decimal(16, 12) NOT NULL,
`pin_yin` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `parent_id`(`parent_id`, `level_type`) USING BTREE,
INDEX `position_x`(`position_x`, `position_y`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '地区表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_auth
-- ----------------------------
DROP TABLE IF EXISTS `cf_auth`;
CREATE TABLE `cf_auth` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
`name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '权限名称',
`module` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '模块名称',
`controller` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '控制器名称',
`method` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '方法名称',
`path` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '权限路径',
`level` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '当前所处层级数',
`description` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '权限描述',
`sort_index` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序',
`router_path` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '路由路径',
`show_menu` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否显示菜单(0-否/1-是)',
`component` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '路由组件',
`router_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '路由名称',
`icon` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '路由图标',
`breadcrumb_hidden` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否隐藏面包屑(0-否/1-是)',
PRIMARY KEY (`id`) USING BTREE,
INDEX `path`(`path`) USING BTREE,
INDEX `sort_index`(`sort_index`) USING BTREE,
INDEX `module`(`module`) USING BTREE,
INDEX `controller`(`controller`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '权限表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Table structure for cf_car_park
-- ----------------------------
DROP TABLE IF EXISTS `cf_car_park`;
CREATE TABLE `cf_car_park` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '停车场名字',
`image` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '停车场照片',
`position_x` decimal(16, 12) NOT NULL COMMENT '经度',
`position_y` decimal(16, 12) NOT NULL COMMENT '纬度',
`start_business_hours` bigint(19) UNSIGNED NOT NULL COMMENT '开始营业时间',
`end_business_hours` bigint(19) UNSIGNED NOT NULL COMMENT '结束营业时间',
`parking_space_number` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '车位数',
`used_parking_space_number` int(11) NOT NULL DEFAULT 0 COMMENT '已用车位数',
`address` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '停车场地址',
`phone` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '手机',
`landline` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '座机',
`status` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '状态(0-正常/1-车位已满/2-暂停营业)',
`country_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '国家id',
`province_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '省份id',
`state_or_city_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '州或城市id',
`zone_or_county_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '区或县id',
`township_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '乡镇id',
`free_time` bigint(19) UNSIGNED NOT NULL DEFAULT 0 COMMENT '免费时长',
`score` decimal(3, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '评分',
`number_of_comments` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '评论数',
`fee_upper_limit` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '单日费用封顶',
`starting_price` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '起步价',
`unit_duration` bigint(19) UNSIGNED NOT NULL COMMENT '单位时长(单位-毫秒)',
`billing_model` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '计费模式(static-静态/dynamic-动态)',
`min_advance_subscribe_time` bigint(19) UNSIGNED NOT NULL DEFAULT 0 COMMENT '允许提前预约的最小时间',
`max_advance_subscribe_time` bigint(19) UNSIGNED NOT NULL DEFAULT 0 COMMENT '允许提前预约的最大时间',
`subscribe_free_time` bigint(19) UNSIGNED NOT NULL DEFAULT 0 COMMENT '预约后多少时间免责取消',
`subscribe_fee` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '预约费用(预付)',
`subscribe_timeout_fee` tinyint(2) UNSIGNED NOT NULL DEFAULT 0 COMMENT '预约后超时但未使用扣费比例(百分比)',
`creater_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '创建者id',
`special_fee_expired_car` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '过期套餐车辆特殊计费(0-不支持/1-支持)',
`show_expired_car_type` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否显示过期套餐车的车辆类型(0-不显示h/1-显示)',
`expired_car_free_time` bigint(16) UNSIGNED NOT NULL DEFAULT 0 COMMENT '过期车辆免费时间',
`show_remarks` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否显示停车记录备注(0-否/1-是)',
`collection_carpark_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '代收费用停车场id',
`limit_parking_space_number` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '车位满时限制进入(0-否/1-是)',
`allow_edit_use_log` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否允许收费员修改停车记录(0-否/1-是)',
`abnormal_auto_release` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '异常记录是否自动放行(0-否/1-是)',
`auto_issued_whitelist` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否自动下发白名单(0-否/1-是)',
`adminer` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '管理员',
`forbid_group_flag_same_time_in` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否禁止家庭组同时入内(0-否/1-是)',
`current_price` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '当前价格(默认取临时车最低价格显示)',
`charging_station_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '充电站id',
`data_report_platform` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '停车数据上报平台',
`leave_time_limit` bigint(19) UNSIGNED NOT NULL DEFAULT 1800000 COMMENT '离场时间限制',
`special_number_plate` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '特殊车牌号',
`storehouse_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '仓库物流id',
`number_plate_color_to_car_type` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '车牌号颜色判定车辆类型(0-否/1-是)',
`package_group_flag_free_time_change` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '家庭组免停期自动切换(0-否/1-是)',
`visit_process_mode` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '车辆预约到访审核模式(0-关闭/1-业主审核/2-物业审核/3-双重审核)',
PRIMARY KEY (`id`) USING BTREE,
INDEX `start_business_hours`(`start_business_hours`, `end_business_hours`) USING BTREE,
INDEX `country_id`(`country_id`, `province_id`, `state_or_city_id`, `zone_or_county_id`, `township_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '停车场表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_car_park_car
-- ----------------------------
DROP TABLE IF EXISTS `cf_car_park_car`;
CREATE TABLE `cf_car_park_car` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`number_plate` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '车牌号',
`uid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '汽车主人id',
`image` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '图片',
`brand` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '汽车品牌(缩写关键字)',
`model` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '型号',
`purchase_time` bigint(19) UNSIGNED NOT NULL DEFAULT 0 COMMENT '购买时间',
`price` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '购买价格',
`create_time` bigint(19) UNSIGNED NOT NULL COMMENT '创建时间',
`update_time` bigint(19) UNSIGNED NOT NULL COMMENT '更新时间',
`status` tinyint(3) UNSIGNED NOT NULL COMMENT '状态(0-已删除/1-审核中/2-正常)',
`identity_image` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '证件照',
`identity_number` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '证件号',
`car_type_key` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '车辆类型',
`car_type_start_time` bigint(16) UNSIGNED NOT NULL DEFAULT 0 COMMENT '车辆类型有效期开始时间',
`car_type_end_time` bigint(16) UNSIGNED NOT NULL DEFAULT 0 COMMENT '车辆类型有效期结束时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `number_plate`(`number_plate`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '车辆表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_car_park_car_limit
-- ----------------------------
DROP TABLE IF EXISTS `cf_car_park_car_limit`;
CREATE TABLE `cf_car_park_car_limit` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`car_park_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '停车场id',
`car_type_key` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '车辆类型',
`free_time` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '免费时间',
`give_free_time` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否赠送免停时间(0-否/1-是)',
`auto_open_door` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否自动开闸(0-否/1-是)',
`forbid_in` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否禁止进入(0-否/1-是)',
`free_release` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '免费放行(0-否/1-是)',
`upper_limit_time` bigint(16) UNSIGNED NOT NULL DEFAULT 0 COMMENT '上限时间',
`billing_model` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '计费模式',
`fee_upper_limit` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '费用上限',
`leave_time_limit` bigint(19) UNSIGNED NOT NULL DEFAULT 1800000 COMMENT '离场时间限制',
PRIMARY KEY (`id`) USING BTREE,
INDEX `car_park_id`(`car_park_id`, `car_type_key`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '停车场车型限制' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_car_park_car_type
-- ----------------------------
DROP TABLE IF EXISTS `cf_car_park_car_type`;
CREATE TABLE `cf_car_park_car_type` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名字',
`flag_key` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '关键字',
`image` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`description` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '描述',
`sort_index` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `flag_key`(`flag_key`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '停车场车辆类型表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Table structure for cf_car_park_charging_rules
-- ----------------------------
DROP TABLE IF EXISTS `cf_car_park_charging_rules`;
CREATE TABLE `cf_car_park_charging_rules` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`car_park_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '停车场id',
`start_time` bigint(19) UNSIGNED NOT NULL COMMENT '开始时间',
`end_time` bigint(19) UNSIGNED NOT NULL COMMENT '结束时间',
`fee` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '实时单价',
`create_time` bigint(19) UNSIGNED NOT NULL COMMENT '创建时间',
`update_time` bigint(19) UNSIGNED NOT NULL COMMENT '更新时间',
`status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态(0-弃用/1-启用)',
`car_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'temporary_car' COMMENT '适用车辆类型',
`type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'unit_of_time' COMMENT '类型(unit_of_time-单位时间/each-每次)',
`group_flag` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '分租标识',
`fee_upper_limit` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '费用上限',
`billing_model` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '收费模式',
PRIMARY KEY (`id`) USING BTREE,
INDEX `car_park_id`(`car_park_id`, `car_type`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '停车场计费规则表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_car_park_checkpoint
-- ----------------------------
DROP TABLE IF EXISTS `cf_car_park_checkpoint`;
CREATE TABLE `cf_car_park_checkpoint` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '(关卡/出入口)名称',
`car_park_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '停车场id',
`position_x` decimal(16, 12) NOT NULL COMMENT '卡点位置经度',
`position_y` decimal(16, 12) NOT NULL COMMENT '卡点位置纬度',
`position_describe` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '位置描述',
`floor` tinyint(3) NOT NULL COMMENT '所在楼层',
`mode` tinyint(2) UNSIGNED NOT NULL COMMENT '模式(0-完全无人值守/1-半自动/2-完全人工值守)',
`status` tinyint(2) UNSIGNED NOT NULL DEFAULT 0 COMMENT '卡点状态(0-正常/1-关闭通行)',
`duty_uid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '值班人员id',
`direction` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '方向(in-入口/out-出口)',
`allow_temporary_car` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '允许临时车通行(0-不允许/1-允许)',
`allow_unconditional_open` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '允许无条件开闸(0-不允许/1-允许)',
`default_check_point` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否为默认通道(0-否/1-是)',
`add_forbidden_data` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否录入禁止车辆数据(0-否/1-是)',
`allow_expired_car` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '允许过期车通过(0-不允许/1-允许)',
`allow_package_car` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否允许月卡车通行(0-否/1-是)',
PRIMARY KEY (`id`) USING BTREE,
INDEX `car_park_id`(`car_park_id`) USING BTREE,
INDEX `position_x`(`position_x`, `position_y`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_car_park_device
-- ----------------------------
DROP TABLE IF EXISTS `cf_car_park_device`;
CREATE TABLE `cf_car_park_device` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`car_park_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '停车场id',
`bar_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '设备条形码',
`brand` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '品牌',
`model` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '型号',
`status` tinyint(2) UNSIGNED NOT NULL DEFAULT 1 COMMENT '0-已下线/1-正常/2-故障维护/3-占用',
`last_online_time` bigint(19) UNSIGNED NOT NULL COMMENT '最近上线时间',
`link_mode` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '连接模式(poll-轮询/socket-长连接)',
`type` tinyint(2) UNSIGNED NOT NULL COMMENT '1-匝道/2-相机',
`checkpoint_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '关卡(出入口)id',
`product_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '产品id',
`direction` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '方向',
`play_contents` varchar(5120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '显示内容',
`ip` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '设备ip',
`video_address` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '设备视频流地址',
`history_video_address` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '设备视频回放地址',
`username` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '设备登录用户名',
`password` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '设备登录密码',
`index_no` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序',
`noticed` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否已通知设备掉线',
`video_mode` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'local' COMMENT '视频模式(local-本地/remote-远程)',
`rows` tinyint(3) UNSIGNED NOT NULL DEFAULT 4 COMMENT '行数(显示屏内容行数)',
`mac_address` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '设备mac地址',
`device_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '设备名称',
`device_no` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '设备编号',
PRIMARY KEY (`id`) USING BTREE,
INDEX `car_park_id`(`car_park_id`) USING BTREE,
INDEX `last_online_time`(`last_online_time`) USING BTREE,
INDEX `bar_code`(`bar_code`, `username`, `password`) USING BTREE,
INDEX `mac_address`(`mac_address`) USING BTREE,
INDEX `device_no`(`device_no`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '停车场设备表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_car_park_device_brand
-- ----------------------------
DROP TABLE IF EXISTS `cf_car_park_device_brand`;
CREATE TABLE `cf_car_park_device_brand` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设备品牌名称',
`image` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '封面/logo',
`sort_index` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '设备品牌表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_car_park_device_link_user
-- ----------------------------
DROP TABLE IF EXISTS `cf_car_park_device_link_user`;
CREATE TABLE `cf_car_park_device_link_user` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`device_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设备id',
`check_point_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '关卡id',
`uid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户id',
`car_park_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '停车场id',
PRIMARY KEY (`id`) USING BTREE,
INDEX `device_id`(`device_id`) USING BTREE,
INDEX `car_park_id`(`car_park_id`, `uid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '设备关联用户表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_car_park_device_vendor
-- ----------------------------
DROP TABLE IF EXISTS `cf_car_park_device_vendor`;
CREATE TABLE `cf_car_park_device_vendor` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '厂商名称',
`country_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '所在国家',
`province_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '省份id',
`state_or_city_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '州或市id',
`county_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '县id',
`position_x` decimal(16, 12) NOT NULL COMMENT '厂商位置经度',
`position_y` decimal(16, 12) NOT NULL COMMENT '厂商位置纬度',
`address` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`introduction` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '厂商简介',
PRIMARY KEY (`id`) USING BTREE,
INDEX `position_x`(`position_x`, `position_y`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '停车场设备厂商表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_car_park_link_user
-- ----------------------------
DROP TABLE IF EXISTS `cf_car_park_link_user`;
CREATE TABLE `cf_car_park_link_user` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`car_park_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '停车场id',
`uid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户id',
`allow_edit` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否允许编辑(0-否/1-是)',
`allow_delete` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否允许删除(0-否/1-是)',
`creater` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否为创建者(0-否/1-是)',
`check_point_ids` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '绑定的通道id(多个,半角逗号隔开)',
`start_duty_time` bigint(16) UNSIGNED NOT NULL DEFAULT 0 COMMENT '开始值班时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `car_park_id`(`car_park_id`, `uid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '停车场与用户关联表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_car_park_package
-- ----------------------------
DROP TABLE IF EXISTS `cf_car_park_package`;
CREATE TABLE `cf_car_park_package` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`car_park_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '停车场id',
`type_key` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '车辆类型',
`start_time` bigint(19) UNSIGNED NOT NULL COMMENT '套餐开始时间',
`end_time` bigint(19) UNSIGNED NOT NULL COMMENT '套餐结束时间',
`create_time` bigint(19) UNSIGNED NOT NULL COMMENT '创建时间',
`uid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户id',
`number_plate` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '车牌号',
`special_give` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否是内部指定套餐(0-否/1-是)',
`package_price_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '套餐价格表id',
`trans_regional` tinyint(3) NOT NULL DEFAULT 0 COMMENT '是否为跨区(0-否/1-是)',
`parent_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '父级id',
`phone` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '手机号',
`main_car_park_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '主停车场id',
`remarks` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '备注',
`car_owner_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '车主姓名',
`group_flag` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '分组',
`status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态(0-禁用/1-正常)',
`issued_whitelist` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否已下发白名单(0-否/1-是)',
`issued_whitelist_time` bigint(16) UNSIGNED NOT NULL DEFAULT 0 COMMENT '白名单下发时间',
`notice_expiring_soon` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否已通知套餐快过期(0-否/1-是)',
`notice_expired` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否已通知套餐已过期(0-否/1-是)',
`special_car_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '特殊车辆id',
PRIMARY KEY (`id`) USING BTREE,
INDEX `uid`(`uid`) USING BTREE,
INDEX `car_park_id`(`car_park_id`) USING BTREE,
INDEX `number_plate`(`number_plate`) USING BTREE,
INDEX `start_time`(`start_time`) USING BTREE,
INDEX `end_time`(`end_time`) USING BTREE,
INDEX `phone`(`phone`) USING BTREE,
INDEX `parent_id`(`parent_id`) USING BTREE,
INDEX `group_flag`(`group_flag`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '车辆对应车场套餐表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Table structure for cf_car_park_package_log
-- ----------------------------
DROP TABLE IF EXISTS `cf_car_park_package_log`;
CREATE TABLE `cf_car_park_package_log` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`before_car_park_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`after_car_park_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`before_type_key` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`after_type_key` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`before_start_time` bigint(20) NOT NULL,
`after_start_time` bigint(20) NOT NULL,
`before_end_time` bigint(20) NOT NULL,
`after_end_time` bigint(20) NOT NULL,
`before_create_time` bigint(20) NOT NULL,
`after_create_time` bigint(20) NOT NULL,
`before_uid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`after_uid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`before_number_plate` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`after_number_plate` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`before_special_give` tinyint(3) UNSIGNED NOT NULL,
`after_special_give` tinyint(3) UNSIGNED NOT NULL,
`before_package_price_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`after_package_price_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`before_trans_regional` tinyint(4) NOT NULL,
`after_trans_regional` tinyint(4) NOT NULL,
`before_parent_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`after_parent_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`before_phone` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`after_phone` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`before_main_car_park_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`after_main_car_park_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`before_remarks` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`after_remarks` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`before_car_owner_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`after_car_owner_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`before_group_flag` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`before_status` tinyint(4) NOT NULL,
`after_status` tinyint(3) UNSIGNED NOT NULL,
`handle_uid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`package_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`action_time` bigint(16) UNSIGNED NOT NULL COMMENT '操作时间',
`after_group_flag` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `package_id`(`package_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '套餐修改记录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_car_park_package_price
-- ----------------------------
DROP TABLE IF EXISTS `cf_car_park_package_price`;
CREATE TABLE `cf_car_park_package_price` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`title` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '标题(名称)',
`subtitle` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '副标题',
`image` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '图标',
`flag_key` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '套餐类型关键字',
`car_park_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '停车场id',
`original_price` decimal(10, 2) UNSIGNED NOT NULL COMMENT '原价',
`current_price` decimal(10, 2) NOT NULL COMMENT '现价',
`time_quota` bigint(19) UNSIGNED NOT NULL COMMENT '时间额度,购买后套餐增加的时间值',
`sort_index` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序',
`special_give` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否为内部指定套餐(0-否/1-是)',
`grace_period` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '宽限期(当月卡过期后宽限几天开始催收临停费)',
`use_grace_period` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否使用宽限期(0-否/1-是)',
`special_car_package` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否为特殊车辆套餐(0-否/1-是)',
PRIMARY KEY (`id`) USING BTREE,
INDEX `car_park_id`(`car_park_id`, `flag_key`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '停车场套餐费用表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Table structure for cf_car_park_payment_agency
-- ----------------------------
DROP TABLE IF EXISTS `cf_car_park_payment_agency`;
CREATE TABLE `cf_car_park_payment_agency` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`car_park_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '停车场id',
`user_payment_agency` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户与支付机构的关联表id',
`sort_index` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序值',
PRIMARY KEY (`id`) USING BTREE,
INDEX `car_park_id`(`car_park_id`, `user_payment_agency`, `sort_index`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '停车场支付机构关联表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_car_park_release_log
-- ----------------------------
DROP TABLE IF EXISTS `cf_car_park_release_log`;
CREATE TABLE `cf_car_park_release_log` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`carpark_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '停车场id',
`carpark_use_log_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '停车记录id',
`number_plate` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '车牌号',
`uid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '申请人',
`device_serial_number` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '序列号',
`application_time` bigint(19) UNSIGNED NOT NULL COMMENT '申请时间',
`application_reason` tinytext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '申请原因',
`execution_time` bigint(19) UNSIGNED NOT NULL DEFAULT 0 COMMENT '执行时间',
`status` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '状态(0-待执行/1-执行成功/2-执行失败)',
`type` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '放行类型(1-正常放行/2-异常放行)',
PRIMARY KEY (`id`) USING BTREE,
INDEX `device_serial_number`(`device_serial_number`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '停车场放行记录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_car_park_special_car
-- ----------------------------
DROP TABLE IF EXISTS `cf_car_park_special_car`;
CREATE TABLE `cf_car_park_special_car` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`car_park_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '停车场id',
`type_key` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '车辆类型',
`start_time` bigint(20) UNSIGNED NOT NULL COMMENT '开始时间',
`end_time` bigint(20) UNSIGNED NOT NULL COMMENT '结束时间',
`create_time` bigint(20) UNSIGNED NOT NULL COMMENT '创建时间',
`uid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户id',
`number_plate` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '车牌号',
`phone` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '手机号',
`remarks` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '备注',
`car_owner_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '车主名称',
`group_flag` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '分组',
`status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态(0-禁用/1-正常)',
`remaining_park_time` bigint(16) UNSIGNED NOT NULL DEFAULT 0 COMMENT '剩余停车时间',
`auto_give_away` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否自动赠送(0-否/1-是)',
`auto_cleared` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否自动清理(0-否/1-是)',
`auto_give_away_date` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '自动赠送日期',
`auto_give_away_amount` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '自动赠送额度',
`auto_give_away_time` bigint(16) UNSIGNED NOT NULL DEFAULT 0 COMMENT '自动赠送执行时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `uid`(`uid`) USING BTREE,
INDEX `_copy_4`(`car_park_id`) USING BTREE,
INDEX `_copy_3`(`number_plate`) USING BTREE,
INDEX `_copy_2`(`start_time`) USING BTREE,
INDEX `_copy_1`(`end_time`) USING BTREE,
INDEX `_copy_7`(`phone`) USING BTREE,
INDEX `auto_give_away_date`(`auto_give_away_date`, `auto_give_away_time`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '停车场特殊车辆表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_car_park_use_log
-- ----------------------------
DROP TABLE IF EXISTS `cf_car_park_use_log`;
CREATE TABLE `cf_car_park_use_log` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`number_plate` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '车牌号',
`uid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '用户id(使用场景:申请临时通行时会标记用户)',
`in_small_image` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '进场小图',
`out_small_image` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '出场小图',
`in_big_image` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '进场大图',
`out_big_image` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '出场大图',
`car_park_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '停车场id',
`subscribe_time` bigint(19) UNSIGNED NOT NULL DEFAULT 0 COMMENT '预约时间',
`cancel_subscribe_time` bigint(19) UNSIGNED NOT NULL DEFAULT 0 COMMENT '取消预约时间',
`in_time` bigint(19) UNSIGNED NOT NULL DEFAULT 0 COMMENT '进场时间',
`out_time` bigint(19) UNSIGNED NOT NULL DEFAULT 0 COMMENT '出场时间',
`in_release_type` tinyint(2) UNSIGNED NOT NULL DEFAULT 0 COMMENT '入场放行方式(0-未知/1-自动抬杆/2-人工抬杆/3-手机放行,断电断网时)',
`out_release_type` tinyint(2) UNSIGNED NOT NULL DEFAULT 0 COMMENT '出场放行方式(0-未知/1-自动抬杆/2-人工抬杆/3-手机放行,断电断网时)',
`in_check_point_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '入口id',
`out_check_point_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '出口id',
`create_position` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '产生该停车记录的位置(out-外场/in-内场)',
`pay_time` bigint(19) UNSIGNED NOT NULL DEFAULT 0 COMMENT '支付时间',
`create_time` bigint(19) UNSIGNED NOT NULL COMMENT '创建时间',
`in_handle_uid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '入场处理者id(例如:值班人id)',
`out_handle_uid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '出场处理者id(例如:值班人id)',
`count_fee_status` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '计费状态(0-实时计算/1-按已存在的出场时间计算)',
`remarks` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '备注',
`car_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '车辆类型',
`car_status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '车辆状态(0-禁用/1-正常/2-已过期),此状态包含套餐,特殊车辆状态',
`visit_unit` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '到访单元',
`give_away_park_time` bigint(16) UNSIGNED NOT NULL DEFAULT 0 COMMENT '赠送的停车时间',
`car_number_plate_color` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '车辆车牌颜色(0:未知、1:蓝色、2:黄色、3:白色、4:黑色、5:绿色)',
`car_brand` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '车辆品牌',
`parking_space_number` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '车位编号',
PRIMARY KEY (`id`) USING BTREE,
INDEX `number_plate`(`number_plate`) USING BTREE,
INDEX `car_park_id`(`car_park_id`) USING BTREE,
INDEX `subscribe_time`(`subscribe_time`) USING BTREE,
INDEX `in_time`(`in_time`) USING BTREE,
INDEX `out_time`(`out_time`) USING BTREE,
INDEX `pay_time`(`pay_time`, `out_handle_uid`) USING BTREE,
INDEX `create_time`(`create_time`) USING BTREE,
INDEX `car_type`(`car_type`) USING BTREE,
INDEX `visit_unit`(`visit_unit`) USING BTREE,
INDEX `car_number_plate_color`(`car_number_plate_color`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '车辆出入记录' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_car_park_visit
-- ----------------------------
DROP TABLE IF EXISTS `cf_car_park_visit`;
CREATE TABLE `cf_car_park_visit` (
`id` bigint(20) NOT NULL,
`car_park_id` bigint(20) UNSIGNED NOT NULL COMMENT '停车场id',
`plate_number` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '车牌号',
`from_uid` bigint(20) UNSIGNED NOT NULL COMMENT '申请者',
`to_uid` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '受访者',
`process_uid` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '审核员',
`create_time` bigint(20) UNSIGNED NOT NULL COMMENT '申请时间',
`process_time` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '审核时间',
`car_park_use_log_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '停车记录',
`visit_time` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '到访时间',
`process_status` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '审核状态(0-待审核/1-已审核/2-已到访)',
`expiration_time` bigint(20) UNSIGNED NOT NULL COMMENT '过期时间',
`destination` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '目的地',
`reason` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '到访原因',
PRIMARY KEY (`id`) USING BTREE,
INDEX `from_uid`(`from_uid`) USING BTREE,
INDEX `to_uid`(`to_uid`) USING BTREE,
INDEX `car_prak_id`(`car_park_id`, `plate_number`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '车辆到访申请表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_car_park_whitelist_issued_log
-- ----------------------------
DROP TABLE IF EXISTS `cf_car_park_whitelist_issued_log`;
CREATE TABLE `cf_car_park_whitelist_issued_log` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`device_sn` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设备序列号',
`number_plate` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '车牌号',
`issued_time` bigint(20) UNSIGNED NOT NULL COMMENT '白名单下发时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `device_sn`(`device_sn`, `number_plate`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '停车场车辆白名单下发记录' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_charging_port
-- ----------------------------
DROP TABLE IF EXISTS `cf_charging_port`;
CREATE TABLE `cf_charging_port` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`port_number` tinyint(3) UNSIGNED NOT NULL COMMENT '充电口编号',
`charging_station_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '充电站编号',
`charging_device_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '充电设备id',
`status` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '状态(0-空闲/1-已连接/2-充电中)',
PRIMARY KEY (`id`) USING BTREE,
INDEX `charging_device_id`(`charging_device_id`, `port_number`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '充电口表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_charging_station
-- ----------------------------
DROP TABLE IF EXISTS `cf_charging_station`;
CREATE TABLE `cf_charging_station` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`station_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '充电站名称',
`image` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '图片',
`station_type` tinyint(3) UNSIGNED NOT NULL COMMENT '充电站类型(1-电动车充电站/2-电动汽车充电站)',
`free_park_time` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '免费停车时间',
`start_price` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '开始价格',
`has_bathroom` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否有洗手间(0-否/1-是)',
`has_lounge` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否有休息室(0-否/1-是)',
`has_dinning_room` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否有餐厅(0-否/1-是)',
`has_shop` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否有商店(0-否/1-是)',
`slow_charge_number` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '慢充数',
`fast_charge_number` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '快充数',
`super_fast_charge_number` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '超级快充数',
`used_slow_charge_number` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '已使用慢充数',
`used_fast_charge_number` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '已使用快充数',
`used_super_fast_charge_number` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '已使用超级快速数',
`floor` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '楼层',
`indoor_or_outdoor` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '室内或者室外(1-室外/2-室内)',
`position_x` decimal(17, 12) NOT NULL COMMENT '经度',
`position_y` decimal(17, 12) NOT NULL COMMENT '纬度',
`country_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '国家id',
`province_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '省份id',
`state_or_city_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '州或城市id',
`zone_or_county_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '区或县id',
`township_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '乡镇id',
`address` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '地址',
`start_business_time` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '开始营业时间',
`end_business_time` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '结束营业时间',
`station_status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态(0-停止营业/1正常营业)',
`phone` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '联系电话',
`service_fee` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '服务费',
`car_park_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '停车场id',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '充电站表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_charging_station_device
-- ----------------------------
DROP TABLE IF EXISTS `cf_charging_station_device`;
CREATE TABLE `cf_charging_station_device` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`charging_station_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '充电站id',
`bar_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '设备条形码',
`brand` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '品牌',
`model` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '型号',
`status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '0-已下线/1-正常/2-故障维护',
`last_online_time` bigint(20) UNSIGNED NOT NULL COMMENT '最近上线时间',
`link_mode` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '连接模式(poll-轮询/socket-长连接)',
`type` tinyint(3) UNSIGNED NOT NULL COMMENT '1-充电桩',
`checkpoint_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '关卡(出入口)id',
`product_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '产品id',
`play_contents` varchar(5120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '显示屏显示规则',
`ip` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '设备ip',
`video_address` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '设备视频流地址',
`history_video_address` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '设备视频回放地址',
`username` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '设备登录用户名',
`password` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '设备登录密码',
`index_no` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序',
`noticed` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否已经通知了设备掉线(0-否/1-是)',
`rows` tinyint(3) UNSIGNED NOT NULL DEFAULT 4 COMMENT '行数(显示屏内容行数)',
`mac_address` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '设备mac地址',
`power` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '功率(单位:瓦-w)',
`power_type` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '功率类型(1-慢充/2-快充/3-特快充)',
`alias_name` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '别名',
PRIMARY KEY (`id`) USING BTREE,
INDEX `charging_station_id`(`charging_station_id`) USING BTREE,
INDEX `_copy_3`(`bar_code`, `brand`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '充电站设备表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_charging_station_device_link_user
-- ----------------------------
DROP TABLE IF EXISTS `cf_charging_station_device_link_user`;
CREATE TABLE `cf_charging_station_device_link_user` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`device_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设备id',
`uid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户id',
`charging_station_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '充电站id',
PRIMARY KEY (`id`) USING BTREE,
INDEX `device_id`(`device_id`) USING BTREE,
INDEX `_copy_1`(`charging_station_id`, `uid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '充电设备关联用户表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_charging_station_device_type
-- ----------------------------
DROP TABLE IF EXISTS `cf_charging_station_device_type`;
CREATE TABLE `cf_charging_station_device_type` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`flag_key` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关键字',
`image` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`description` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '描述',
`sort_index` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `flag_key`(`flag_key`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '充电站设备类型表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_charging_station_link_user
-- ----------------------------
DROP TABLE IF EXISTS `cf_charging_station_link_user`;
CREATE TABLE `cf_charging_station_link_user` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`charging_station_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '充电站id',
`uid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户id',
`allow_edit` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否允许编辑(0-否/1-是)',
`allow_delete` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否允许删除(0-否/1-是)',
`creater` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否为创建者(0-否/1-是)',
`check_point_ids` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '绑定的通道id(多个,半角逗号隔开)',
`start_duty_time` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '开始值班时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `charging_station_id`(`charging_station_id`, `uid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '充电站与用户关联表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_charging_station_payment_agency
-- ----------------------------
DROP TABLE IF EXISTS `cf_charging_station_payment_agency`;
CREATE TABLE `cf_charging_station_payment_agency` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`charging_station_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '充电站id',
`user_payment_agency` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户与支付机构的关联表id',
`sort_index` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '排序值',
PRIMARY KEY (`id`) USING BTREE,
INDEX `charging_station_id`(`charging_station_id`, `user_payment_agency`, `sort_index`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '充电站支付机构关联表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_charging_station_rules
-- ----------------------------
DROP TABLE IF EXISTS `cf_charging_station_rules`;
CREATE TABLE `cf_charging_station_rules` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`charging_station_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '充电站id',
`start_time` bigint(20) UNSIGNED NOT NULL COMMENT '开始时间',
`end_time` bigint(20) UNSIGNED NOT NULL COMMENT '结束时间',
`fee` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '实时单价',
`create_time` bigint(20) UNSIGNED NOT NULL COMMENT '创建时间',
`update_time` bigint(20) UNSIGNED NOT NULL COMMENT '更新时间',
`status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态(0-弃用/1-启用)',
`charging_device_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '适用充电设备类型',
`type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '类型(unit_of_time-单位时间/each-每次)',
`group_flag` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '分组标识',
`fee_upper_limit` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '费用上限',
`service_fee` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '服务费',
PRIMARY KEY (`id`) USING BTREE,
INDEX `charging_station_id`(`charging_station_id`, `start_time`, `end_time`, `charging_device_type`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '充电站计费规则表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_charging_use_log
-- ----------------------------
DROP TABLE IF EXISTS `cf_charging_use_log`;
CREATE TABLE `cf_charging_use_log` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`charging_station_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '充电站id',
`charging_device_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '充电站设备id',
`charging_port` varchar(8) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '充电口',
`start_time` bigint(20) UNSIGNED NOT NULL COMMENT '开始时间',
`end_time` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '结束时间',
`uid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户id',
`charging_fee` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '充电费',
`service_fee` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '服务费',
`plan_charging_fee` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '计划充电费用',
`charginged_kwh` float(10, 6) UNSIGNED NOT NULL DEFAULT 0.000000 COMMENT '已充电度数',
`plan_charging_kwh` float(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '计划充电度数',
`charging_price` decimal(10, 2) UNSIGNED NOT NULL COMMENT '充电价格',
`charging_status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '充电状态(1‐正准备开始充电/2‐充电进行中/3‐充电结束/4‐启动失败/5‐系统故障(不能给汽车充电)',
`end_reason` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '结束原因',
`service_price` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '服务费价格',
`charging_power` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '充电功率',
`plan_charging_time` bigint(16) UNSIGNED NOT NULL DEFAULT 0 COMMENT '计划充电时长',
`charging_type` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '充电类型(0-未知/1-两轮电动车/2-四轮电动汽车)',
PRIMARY KEY (`id`) USING BTREE,
INDEX `charging_station_id`(`charging_station_id`) USING BTREE,
INDEX `start_time`(`start_time`) USING BTREE,
INDEX `end_time`(`end_time`) USING BTREE,
INDEX `uid`(`uid`) USING BTREE,
INDEX `charging_device_id`(`charging_device_id`, `charging_port`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '充电记录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_coupon
-- ----------------------------
DROP TABLE IF EXISTS `cf_coupon`;
CREATE TABLE `cf_coupon` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`to_uid` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '受赠用户id',
`from_uid` varchar(19) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '发放者id',
`scenes` tinyint(2) UNSIGNED NOT NULL COMMENT '使用场景(0-通用/1-停车场/2-传统商城)',
`shop_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '店铺id(为空时表示不限店铺使用)',
`goods_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '商品id(留空这表示不限商品)',
`denomination` decimal(16, 2) UNSIGNED NOT NULL COMMENT '优惠券面额(该面额可能时毫秒时间戳,金钱数,剩余使用次数)',
`threshold_price` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '门槛价',
`effective_time` bigint(19) UNSIGNED NOT NULL COMMENT '生效时间',
`expire_time` bigint(19) UNSIGNED NOT NULL COMMENT '失效时间',
`status` tinyint(3) UNSIGNED NOT NULL COMMENT '状态(0-已使用/1-未使用/2-锁定)',
`create_time` bigint(19) UNSIGNED NOT NULL COMMENT '创建时间',
`use_time` bigint(19) UNSIGNED NOT NULL COMMENT '使用时间',
`amount_used` decimal(16, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '已使用金额',
`coupon_type` tinyint(3) UNSIGNED NOT NULL COMMENT '优惠券类型(1-次数券/2-金额券/3-时长券)',
PRIMARY KEY (`id`) USING BTREE,
INDEX `to_uid`(`to_uid`, `effective_time`, `expire_time`, `scenes`) USING BTREE,
INDEX `goods_id`(`goods_id`, `denomination`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '优惠券表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for cf_coupon_activity
-- ----------------------------
DROP TABLE IF EXISTS `cf_coupon_activity`;
CREATE TABLE `cf_coupon_activity` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`title` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '活动标题',
`subtitle` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '副标题',
`image` varchar(2048) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '活动图片',
`introduction` varchar(4096) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '活动简介',
`type` tinyint(3) UNSIGNED NOT NULL COMMENT '0-通用/1-停车场/2-传统商城',
`start_time` bigint(16) UNSIGNED NOT NULL COMMENT '开始时间',
`end_time` bigint(16) UNSIGNED NOT NULL COMMENT '结束时间',
`main_body_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '活动主体id',
`creater_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '创建者id(发起者id)',
`denomination` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '优惠券面额',
`threshold_price` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '门槛价',
`goods_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '指定商品id(为空则不指定)',
`total_issue_quantity` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '总发行量',
`issued_quantity` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '已发行量',
`unit_of_time` bigint(16) UNSIGNED NOT NULL DEFAULT 0 COMMENT '单位时间',
`unit_of_time_total_issue_quantity` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '单位时间发行量',
`unit_of_time_total_issued_quantity` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '单位时间已发行量',
`unit_of_time_issue_gradient` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '单位时间发行梯度',
`last_issue_time` bigint(16) UNSIGNED NOT NULL DEFAULT 0 COMMENT '最近发行时间',
`user_condition` varchar(2048) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '筛选用户条件',
`repeat_times` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '允许重复领取次数',
`status` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '状态(0-暂停/1-正常/2-待支付)',
`create_time` bigint(16) UNSIGNED NOT NULL COMMENT '创建时间',
`update_time` bigint(16) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
`show_in_carpark_list` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否显示在停车场列表中(0-否/1-是)',
`total_issue_quota` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '总发行额度',
`issued_quota` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '已发行额度',
`phone` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '手机号',
`recharge_ratio` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 1.00 COMMENT '充值比例,例如比例为10充10得100',
`shopkeeper_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '店主名称',
`project_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '项目名称',
`trade_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '行业',
`coupon_type` tinyint(3) UNSIGNED NOT NULL DEFAULT 2 COMMENT '优惠券类型(1-次数券/2-金额券/3-时长券)',
`auto_give_away` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否自动赠送(0-否/1-是)',
`auto_cleared` tinyint(3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否自动清理(0-否/1-是)',
`auto_give_away_date` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '自动赠送日期',
`auto_give_away_quota` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '自动赠送金额',
`auto_give_away_time` bigint(16) UNSIGNED NOT NULL DEFAULT 0 COMMENT '自动赠送执行时间',
`auto_give_away_overage_quota` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '自动赠送剩余额度',
`remaining_times` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '剩余次数(次数券)',
`remaining_time` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '剩余时长(时长券)',
`times_coupon_price` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '次数券价格',
`time_coupon_price` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '时长券价格',
`amount_daily_limit` decimal(10, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '金额券每日上限,默认为0不限制',
`times_daily_limit` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '次数券每日上限,默认为0不限制',
`time_daily_limit` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '时长券每日上限,默认为0不限制,单位毫秒',
PRIMARY KEY (`id`) USING BTREE,
INDEX `type`(`type`, `start_time`, `end_time`, `main_body_id`) USING BTREE,
INDEX `phone`(`phone`) USING BTREE,
INDEX `trade_type`(`trade_type`) USING BTREE,
INDEX `auto_give_away_date`(`auto_give_away_date`, `auto_give_away_time`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '优惠券发行活动表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Table structure for cf_coupon_activity_coupon_type
-- ----------------------------
DROP TABLE IF EXISTS `cf_coupon_activity_coupon_type`;
CREATE TABLE `cf_coupon_activity_coupon_type` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`coupon_activity_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '优惠券活动id',
`fixed_extension_time` bigint(16) UNSIGNED NOT NULL COMMENT '固定延长时间(当前时间起往后延长)',
`denomination` decimal(15, 2) UNSIGNED NOT NULL COMMENT '面额',
`coupon_type` tinyint(3) UNSIGNED NOT NULL DEFAULT 2 COMMENT '优惠券类型(1-次数券/2-金额券/3-时长券)',
`require_using` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否要求在服务中(0-否/1-是)',
PRIMARY KEY (`id`) USING BTREE,