CREATE database if NOT EXISTS `lb-doc` default character set utf8mb4 collate utf8mb4_general_ci;
use `lb-doc`;

/*
 Navicat Premium Data Transfer

 Source Server         : docker
 Source Server Type    : MySQL
 Source Server Version : 80029
 Source Host           : localhost:3306
 Source Schema         : lb-doc

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

 Date: 06/07/2022 16:32:03
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for doc_file
-- ----------------------------
DROP TABLE IF EXISTS `doc_file`;
CREATE TABLE `doc_file`  (
  `file_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `file_size` bigint NULL DEFAULT NULL COMMENT '文件大小',
  `file_status` int NULL DEFAULT NULL COMMENT '文件状态(0-失效，1-生效)',
  `file_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件url',
  `identifier` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'md5唯一标识',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `storage_type` int NULL DEFAULT NULL COMMENT '存储类型',
  PRIMARY KEY (`file_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of doc_file
-- ----------------------------
INSERT INTO `doc_file` VALUES ('1544579737907228672', 52, 1, '/20220706/df9f7990cac34fceb0edba41d70293ee.txt', '4e8d648be10ee0b8abe89807613cbb12', 'admin', '2022-07-06 15:11:21', NULL, NULL, NULL);
INSERT INTO `doc_file` VALUES ('1544579740239261696', 7655424, 1, '/20220706/4ea9af42e00d4a418b0a4cee6c1af9bc.iso', '34cc07c5ecc59ddf7f635b20525a0a52', 'admin', '2022-07-06 15:11:22', NULL, NULL, NULL);
INSERT INTO `doc_file` VALUES ('1544579742093144064', 2099206, 1, '/20220706/d26ef942e49840b4b3a631dbc3f17289.doc', '9fbb03cc5a7565f4cab41b924391ef07', 'admin', '2022-07-06 15:11:22', NULL, NULL, NULL);

-- ----------------------------
-- Table structure for doc_file_path
-- ----------------------------
DROP TABLE IF EXISTS `doc_file_path`;
CREATE TABLE `doc_file_path`  (
  `path_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `delete_batch_num` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '删除批次号',
  `delete_flag` int NULL DEFAULT NULL COMMENT '删除标识(0-未删除，1-已删除)',
  `delete_time` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '删除时间',
  `extend_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '扩展名',
  `file_id` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件id',
  `file_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件名',
  `file_path` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文件路径',
  `is_dir` int NULL DEFAULT NULL COMMENT '是否是目录(0-否,1-是)',
  `create_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  `path_status` int NULL DEFAULT NULL,
  PRIMARY KEY (`path_id`) USING BTREE,
  UNIQUE INDEX `fileindex`(`file_path` ASC, `file_name` ASC, `extend_name` ASC, `delete_flag` ASC, `is_dir` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of doc_file_path
-- ----------------------------
INSERT INTO `doc_file_path` VALUES ('1544586695808774145', NULL, 0, NULL, '', NULL, 'aliyunDownload', '/', 1, 'admin', '2022-07-06 15:39:00', 'admin', '2022-07-06 15:39:25', 1);
INSERT INTO `doc_file_path` VALUES ('1544586695812968448', NULL, 0, NULL, 'txt', '1544579737907228672', 'test.txt', '/aliyunDownload/', 0, 'admin', '2022-07-06 15:39:00', 'admin', '2022-07-06 15:39:25', 1);
INSERT INTO `doc_file_path` VALUES ('1544586696442114048', NULL, 0, NULL, '', NULL, 'BaiduNetdiskDownload', '/', 1, 'admin', '2022-07-06 15:39:00', 'admin', '2022-07-06 15:39:25', 1);
INSERT INTO `doc_file_path` VALUES ('1544586696450502656', NULL, 0, NULL, '', NULL, 'bdy', '/BaiduNetdiskDownload/', 1, 'admin', '2022-07-06 15:39:00', 'admin', '2022-07-06 15:39:25', 1);
INSERT INTO `doc_file_path` VALUES ('1544586696618274816', NULL, 0, NULL, 'iso', '1544579740239261696', 'HEU_KMS_Activator_v24.2.0.iso', '/BaiduNetdiskDownload/', 0, 'admin', '2022-07-06 15:39:00', 'admin', '2022-07-06 15:39:25', 1);
INSERT INTO `doc_file_path` VALUES ('1544586697243226112', NULL, 0, NULL, 'iso', '1544579740239261696', 'HEU_KMS_Activator_v24.2.0.iso', '/', 0, 'admin', '2022-07-06 15:39:00', 'admin', '2022-07-06 15:39:25', 1);
INSERT INTO `doc_file_path` VALUES ('1544586697679433728', NULL, 0, NULL, 'doc', '1544579742093144064', 'Q／JXZY-GF+219.1+052-2021+ZB45（GDX2）包装机组操作规程.doc', '/', 0, 'admin', '2022-07-06 15:39:00', 'admin', '2022-07-06 15:39:25', 1);
INSERT INTO `doc_file_path` VALUES ('1544586697847205889', NULL, 0, NULL, '', NULL, '／／⁄', '/', 1, 'admin', '2022-07-06 15:39:00', 'admin', '2022-07-06 15:39:25', 1);

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role`  (
  `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键id',
  `role_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色名称',
  `role_code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '角色编码',
  `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '描述',
  `create_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
  `create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
  `update_by` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人',
  `update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uniq_sys_role_role_code`(`role_code` ASC) USING BTREE,
  INDEX `idx_sr_role_code`(`role_code` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of sys_role
-- ----------------------------

SET FOREIGN_KEY_CHECKS = 1;
