Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-opsdoc
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 620b0181
authored
May 05, 2022
by
向延琳
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
二押警情数据库
1 parent
a89f1bef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
1 deletions
1.7.0_五月/1.7.0数据库SQL脚本.sql
1.7.0_五月/1.7.0数据库SQL脚本.sql
View file @
620b018
...
...
@@ -81,4 +81,49 @@ create table t_device_speeding
KEY
`idx_begin_time`
(
`begin_time`
),
unique
key
`uk_sn_vd`
(
`sn`
,
`vd_id`
,
`del_flag`
)
)
comment
'设备超速记录表'
;
\ No newline at end of file
comment
'设备超速记录表'
;
-- 二押警情数据表
create
table
t_alarm_second_data
(
id
int
auto_increment
comment
'id'
primary
key
,
sn
varchar
(
32
)
null
comment
'设备号'
,
vd_id
int
(
11
)
default
0
null
comment
'车辆、设备关系id'
,
type
varchar
(
32
)
null
comment
'二押区域规则类型(二押地停留)'
,
name
varchar
(
32
)
null
comment
'二押区域规则名称(二押地停留)'
,
alarm_time
datetime
null
comment
'二押区域报警时间'
,
alarm_address
varchar
(
128
)
null
comment
'二押区域报警位置'
,
leave_time
datetime
null
comment
'离开二押区域时间(当前还未动身的数据不记录到数据库)'
,
stay_time
int
(
8
)
null
comment
'二押区域停留时长'
,
lng
varchar
(
20
)
null
comment
'二押区域停留经度'
,
lat
varchar
(
20
)
null
comment
'二押区域停留纬度'
,
event_time
datetime
null
comment
'事件时间,写入事件'
,
unique_flag
varchar
(
64
)
null
comment
'唯一标识 设备号加上报警时间'
,
del_flag
tinyint
default
0
null
comment
'是否删除 0=正常 -1=删除'
,
created_date
datetime
null
comment
'创建时间|入库时间'
,
created_by
int
(
11
)
null
comment
'创建人用户id'
,
updated_date
datetime
null
comment
'更新时间'
,
updated_by
int
(
11
)
null
comment
'更新人用户id'
,
KEY
`idx_sn`
(
`sn`
),
KEY
`idx_unique_flag`
(
`unique_flag`
,
`del_flag`
)
)
comment
'二押警情数据表'
charset
=
utf8mb4
;
-- 二押警情和二手车关系表
create
table
t_alarm_second_data_near_rel
(
id
int
auto_increment
comment
'id'
primary
key
,
second_data_id
int
null
comment
'二押kafka数据表 `d_alarm_second_data`的id'
,
near_second_id
int
null
comment
'300米二手车行id'
,
del_flag
tinyint
default
0
null
comment
'是否删除 0=正常 -1=删除'
,
created_date
datetime
null
comment
'创建时间|入库时间'
,
created_by
int
(
11
)
null
comment
'创建人用户id'
,
updated_date
datetime
null
comment
'更新时间'
,
updated_by
int
(
11
)
null
comment
'更新人用户id'
,
KEY
`idx_second_data_id`
(
`second_data_id`
),
KEY
`idx_near_second_id`
(
`near_second_id`
)
)
comment
'二押警情和二手车关系表'
charset
=
utf8mb4
;
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment