/*
 Navicat Premium Data Transfer

 Source Server         : local-192.168.0.25
 Source Server Type    : MySQL
 Source Server Version : 80027
 Source Host           : 192.168.0.25:3306
 Source Schema         : 4dkankan_v4

 Target Server Type    : MySQL
 Target Server Version : 80027
 File Encoding         : 65001

 Date: 25/09/2023 09:45:35
*/
use 4dkankan_v4;

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for jy_scene_auth
-- ----------------------------
DROP TABLE IF EXISTS `jy_scene_auth`;
CREATE TABLE `jy_scene_auth`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `num` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '场景码',
  `auth_type` int NULL DEFAULT NULL COMMENT '0授权用户，1公开浏览',
  `rec_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'A',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for jy_scene_user_auth
-- ----------------------------
DROP TABLE IF EXISTS `jy_scene_user_auth`;
CREATE TABLE `jy_scene_user_auth`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `num` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '场景码',
  `jy_user_id` int NULL DEFAULT NULL,
  `look_auth` int NULL DEFAULT NULL COMMENT '是否有浏览权限0否，1不限时查看，2限时查看',
  `edit_auth` int NULL DEFAULT NULL COMMENT '是否有编辑权限0否，1不限时编辑，2限时编辑',
  `look_end_time` timestamp NULL DEFAULT NULL COMMENT '浏览截止时间',
  `edit_end_time` timestamp NULL DEFAULT NULL COMMENT '编辑截止时间',
  `is_author` int NULL DEFAULT 0 COMMENT '是否有授权他人权限，0否，1是',
  `can_auth_look` int NULL DEFAULT NULL COMMENT '是否有授权他人查看权限 0否，1是',
  `can_edit_look` int NULL DEFAULT NULL COMMENT '是否有授权他人编辑权限 0 否，1是',
  `rec_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'A',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 18 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for jy_user
-- ----------------------------
DROP TABLE IF EXISTS `jy_user`;
CREATE TABLE `jy_user`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `ry_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '人员id',
  `ry_password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '密码',
  `ry_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '编号',
  `ry_nick_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `user_id` int NULL DEFAULT NULL,
  `sys_user_id` int NULL DEFAULT NULL,
  `rec_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'A',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;

delete from t_user;

INSERT INTO t_user (id,user_name,nick_name,`password`,head,rec_status,register_time) VALUES(1,"super-admin","super-admin","5EFG@AB","/oss/manage/user/newHead.png",'A',NOW());

delete from jy_user;

INSERT INTO jy_user (id,ry_id,ry_password,`ry_no`,ry_nick_name,user_id,sys_user_id) VALUES(1,"super-admin","afdd0b4ad2ec172c586e2150770fbf9e","super-admin","super-admin",1,1);

update t_camera_detail  set user_id = null;

update t_scene_plus  set user_id = 1;

UPDATE t_scene_pro set user_id = 1;