From 62e82ea9ee6a73cf7cdcfe1ab1a7b49a23f571e3 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期五, 15 十月 2021 17:58:28 +0800
Subject: [PATCH] 录像下载修复

---
 sql/mysql.sql |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 50 insertions(+), 2 deletions(-)

diff --git a/sql/mysql.sql b/sql/mysql.sql
index 5d8bbfc..4501257 100644
--- a/sql/mysql.sql
+++ b/sql/mysql.sql
@@ -23,7 +23,8 @@
     updateTime    varchar(50)  not null,
     port          int          not null,
     expires       int          not null,
-    hostAddress   varchar(50)  not null
+    hostAddress   varchar(50)  not null,
+    charset       varchar(50)  not null
 );
 
 create table device_channel
@@ -60,9 +61,39 @@
     primary key (channelId, deviceId)
 );
 
+create table device_alarm
+(
+    id                int auto_increment
+        primary key,
+    deviceId          varchar(50) not null,
+    channelId         varchar(50) not null,
+    alarmPriority     varchar(50) not null,
+    alarmMethod       varchar(50),
+    alarmTime         varchar(50) not null,
+    alarmDescription  varchar(255),
+    longitude         double null,
+    latitude          double null,
+    alarmType         varchar(50)
+);
+
+create table log
+(
+    id                int auto_increment
+        primary key,
+    name        varchar(50)     not null,
+    type        varchar(50)     not null,
+    uri         varchar(200)    not null,
+    address     varchar(50)     not null,
+    result      varchar(50)     not null,
+    timing      bigint          not null,
+    username    varchar(50)     not null,
+    createTime  varchar(50)     not null
+);
+
 create table device_mobile_position
 (
     deviceId       varchar(50)  not null,
+    channelId      varchar(50)  not null,
     deviceName     varchar(255) null,
     time           varchar(50)  not null,
     longitude      double       not null,
@@ -111,6 +142,7 @@
     streamNoneReaderDelayMS int          not null,
     rtpEnable               int          not null,
     rtpPortRange            varchar(50)  not null,
+    sendRtpPortRange        varchar(50)  not null,
     recordAssistPort        int          not null,
     defaultServer           int          not null,
     createTime              varchar(50)  not null,
@@ -199,6 +231,22 @@
     username    varchar(255) not null,
     password    varchar(255) not null,
     roleId      int          not null,
-    create_time varchar(50)  not null
+    createTime varchar(50)  not null,
+    updateTime varchar(50)  not null
 );
 
+create unique index user_username_uindex
+    on user (username);
+
+insert into user (username, password, roleId, createTime, updateTime) values ('admin', '21232f297a57a5a743894a0e4a801fc3', '1', '2021-04-13 14:14:57', '2021-04-13 14:14:57');
+
+create table role (
+        id          int auto_increment
+                    primary key,
+        name        TEXT NOT NULL,
+        authority   TEXT NOT NULL,
+        createTime  varchar(50)  not null,
+        updateTime  varchar(50)  not null
+);
+insert into role (id, name, authority, createTime, updateTime) values ('1', 'admin', '0', '2021-04-13 14:14:57', '2021-04-13 14:14:57');
+

--
Gitblit v1.8.0