2021-04-16 16:04:39 +08:00
|
|
|
-- auto-generated definition
|
|
|
|
create schema wvp collate utf8_bin;
|
|
|
|
|
|
|
|
create table device
|
|
|
|
(
|
2021-04-27 15:38:00 +08:00
|
|
|
deviceId varchar(50) not null
|
2021-04-16 16:04:39 +08:00
|
|
|
primary key,
|
2021-04-27 15:38:00 +08:00
|
|
|
name varchar(50) null,
|
|
|
|
manufacturer varchar(50) null,
|
|
|
|
model varchar(50) null,
|
|
|
|
firmware varchar(50) null,
|
|
|
|
transport varchar(50) null,
|
|
|
|
streamMode varchar(50) null,
|
|
|
|
online varchar(50) null,
|
2021-04-16 16:04:39 +08:00
|
|
|
registerTimeMillis int null,
|
2021-04-27 15:38:00 +08:00
|
|
|
ip varchar(50) not null,
|
2021-04-16 16:04:39 +08:00
|
|
|
port int not null,
|
2021-04-27 15:38:00 +08:00
|
|
|
hostAddress varchar(50) not null
|
2021-04-16 16:04:39 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
create table device_channel
|
|
|
|
(
|
2021-04-27 15:38:00 +08:00
|
|
|
channelId varchar(50) not null,
|
|
|
|
name varchar(50) null,
|
|
|
|
manufacture varchar(50) null,
|
|
|
|
model varchar(50) null,
|
|
|
|
owner varchar(50) null,
|
|
|
|
civilCode varchar(50) null,
|
|
|
|
block varchar(50) null,
|
|
|
|
address varchar(50) null,
|
|
|
|
parentId varchar(50) null,
|
2021-04-16 16:04:39 +08:00
|
|
|
safetyWay int null,
|
|
|
|
registerWay int null,
|
2021-04-27 15:38:00 +08:00
|
|
|
certNum varchar(50) null,
|
2021-04-16 16:04:39 +08:00
|
|
|
certifiable int null,
|
|
|
|
errCode int null,
|
2021-04-27 15:38:00 +08:00
|
|
|
endTime varchar(50) null,
|
|
|
|
secrecy varchar(50) null,
|
|
|
|
ipAddress varchar(50) null,
|
2021-04-16 16:04:39 +08:00
|
|
|
port int null,
|
2021-04-27 15:38:00 +08:00
|
|
|
password varchar(50) null,
|
2021-04-16 16:04:39 +08:00
|
|
|
PTZType int null,
|
|
|
|
status int null,
|
|
|
|
longitude double null,
|
|
|
|
latitude double null,
|
2021-04-27 15:38:00 +08:00
|
|
|
streamId varchar(50) null,
|
|
|
|
deviceId varchar(50) not null,
|
|
|
|
parental varchar(50) null,
|
2021-04-28 17:52:11 +08:00
|
|
|
hasAudio bit(1) null,
|
2021-04-16 16:04:39 +08:00
|
|
|
primary key (channelId, deviceId)
|
|
|
|
);
|
|
|
|
|
|
|
|
create table device_mobile_position
|
|
|
|
(
|
2021-04-27 15:38:00 +08:00
|
|
|
deviceId varchar(50) not null,
|
|
|
|
deviceName varchar(50) null,
|
|
|
|
time varchar(50) not null,
|
2021-04-16 16:04:39 +08:00
|
|
|
longitude double not null,
|
|
|
|
latitude double not null,
|
|
|
|
altitude double null,
|
|
|
|
speed double null,
|
|
|
|
direction double null,
|
2021-04-27 15:38:00 +08:00
|
|
|
reportSource varchar(50) null,
|
|
|
|
geodeticSystem varchar(50) null,
|
|
|
|
cnLng varchar(50) null,
|
|
|
|
cnLat varchar(50) null,
|
2021-04-16 16:04:39 +08:00
|
|
|
primary key (deviceId, time)
|
|
|
|
);
|
|
|
|
|
|
|
|
create table gb_stream
|
|
|
|
(
|
2021-04-27 15:38:00 +08:00
|
|
|
app varchar(50) not null,
|
|
|
|
stream varchar(50) not null,
|
|
|
|
gbId varchar(50) not null,
|
|
|
|
name varchar(50) null,
|
2021-04-16 16:04:39 +08:00
|
|
|
longitude double null,
|
|
|
|
latitude double null,
|
2021-04-27 15:38:00 +08:00
|
|
|
streamType varchar(50) null,
|
2021-04-16 16:04:39 +08:00
|
|
|
status int null,
|
|
|
|
primary key (app, stream, gbId)
|
|
|
|
);
|
|
|
|
|
|
|
|
create table parent_platform
|
|
|
|
(
|
|
|
|
enable int null,
|
2021-04-27 15:38:00 +08:00
|
|
|
name varchar(50) null,
|
|
|
|
serverGBId varchar(50) not null
|
2021-04-16 16:04:39 +08:00
|
|
|
primary key,
|
2021-04-27 15:38:00 +08:00
|
|
|
serverGBDomain varchar(50) null,
|
|
|
|
serverIP varchar(50) null,
|
2021-04-16 16:04:39 +08:00
|
|
|
serverPort int null,
|
2021-04-27 15:38:00 +08:00
|
|
|
deviceGBId varchar(50) not null,
|
|
|
|
deviceIp varchar(50) null,
|
|
|
|
devicePort varchar(50) null,
|
|
|
|
username varchar(50) null,
|
|
|
|
password varchar(50) null,
|
|
|
|
expires varchar(50) null,
|
|
|
|
keepTimeout varchar(50) null,
|
|
|
|
transport varchar(50) null,
|
|
|
|
characterSet varchar(50) null,
|
2021-04-16 16:04:39 +08:00
|
|
|
ptz int null,
|
|
|
|
rtcp int null,
|
2021-04-28 17:52:11 +08:00
|
|
|
status bit(1) null
|
2021-04-16 16:04:39 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
create table platform_gb_channel
|
|
|
|
(
|
2021-04-27 15:38:00 +08:00
|
|
|
channelId varchar(50) not null,
|
|
|
|
deviceId varchar(50) not null,
|
|
|
|
platformId varchar(50) not null,
|
|
|
|
deviceAndChannelId varchar(50) not null,
|
2021-04-16 16:04:39 +08:00
|
|
|
primary key (deviceAndChannelId, platformId)
|
|
|
|
);
|
|
|
|
|
|
|
|
create table platform_gb_stream
|
|
|
|
(
|
2021-04-27 15:38:00 +08:00
|
|
|
platformId varchar(50) not null,
|
|
|
|
app varchar(50) not null,
|
|
|
|
stream varchar(50) not null,
|
2021-04-16 16:04:39 +08:00
|
|
|
primary key (platformId, app, stream)
|
|
|
|
);
|
|
|
|
|
|
|
|
create table stream_proxy
|
|
|
|
(
|
2021-04-27 15:38:00 +08:00
|
|
|
type varchar(50) not null,
|
|
|
|
app varchar(50) not null,
|
|
|
|
stream varchar(50) not null,
|
|
|
|
url varchar(50) null,
|
|
|
|
src_url varchar(50) null,
|
2021-04-16 16:04:39 +08:00
|
|
|
dst_url blob null,
|
|
|
|
timeout_ms int null,
|
2021-04-27 15:38:00 +08:00
|
|
|
ffmpeg_cmd_key varchar(50) null,
|
|
|
|
rtp_type varchar(50) null,
|
2021-04-28 17:52:11 +08:00
|
|
|
enable_hls bit(1) null,
|
|
|
|
enable_mp4 bit(1) null,
|
|
|
|
enable bit(1) not null,
|
2021-04-16 16:04:39 +08:00
|
|
|
primary key (app, stream)
|
|
|
|
);
|
|
|
|
|
|
|
|
create table stream_push
|
|
|
|
(
|
2021-04-27 15:38:00 +08:00
|
|
|
app varchar(50) not null,
|
|
|
|
stream varchar(50) not null,
|
|
|
|
totalReaderCount varchar(50) null,
|
2021-04-16 16:04:39 +08:00
|
|
|
originType int null,
|
2021-04-27 15:38:00 +08:00
|
|
|
originTypeStr varchar(50) null,
|
2021-04-16 16:04:39 +08:00
|
|
|
createStamp int null,
|
|
|
|
aliveSecond int null,
|
|
|
|
primary key (app, stream)
|
|
|
|
);
|
|
|
|
|
|
|
|
create table user
|
|
|
|
(
|
|
|
|
id int auto_increment
|
|
|
|
primary key,
|
2021-04-27 15:38:00 +08:00
|
|
|
username varchar(50) not null,
|
|
|
|
password varchar(50) not null,
|
2021-04-16 16:04:39 +08:00
|
|
|
roleId int not null,
|
2021-04-27 15:38:00 +08:00
|
|
|
create_time varchar(50) not null
|
2021-04-16 16:04:39 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
insert into user (username, password, roleId, create_time) values ('admin', '21232f297a57a5a743894a0e4a801fc3', '0', '2021-04-13 14:14:57');
|