/*
 Navicat Premium Dump SQL

 Source Server         : 123
 Source Server Type    : MySQL
 Source Server Version : 50724 (5.7.24-log)
 Source Host           : localhost:3306
 Source Schema         : knowledge_management_system

 Target Server Type    : MySQL
 Target Server Version : 50724 (5.7.24-log)
 File Encoding         : 65001

 Date: 02/05/2026 17:47:52
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for file
-- ----------------------------
DROP TABLE IF EXISTS `file`;
CREATE TABLE `file`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '文件名',
  `file_path` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '文件存储路径',
  `file_size` bigint(20) NULL DEFAULT NULL COMMENT '文件大小（字节）',
  `file_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '文件类型（MIME类型）',
  `extension` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '文件扩展名',
  `file_md5` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '文件MD5值',
  `upload_user_id` bigint(20) NULL DEFAULT NULL COMMENT '上传用户ID',
  `dept_id` bigint(20) NULL DEFAULT NULL COMMENT '部门ID',
  `is_public` tinyint(4) NULL DEFAULT 1 COMMENT '是否公开：0-私密，1-公开',
  `file_category` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT 'personal' COMMENT '文件分类：rule-制度文件，personal-个人文件',
  `description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '文件描述',
  `status` tinyint(4) NULL DEFAULT 1 COMMENT '状态：0-禁用，1-启用',
  `audit_status` tinyint(4) NULL DEFAULT 0 COMMENT '审核状态：0-待审核，1-已通过，2-已拒绝',
  `vector_db_address` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '向量库地址',
  `download_count` int(11) NULL DEFAULT 0 COMMENT '下载次数',
  `create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` datetime NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `process_status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'INDEXED' COMMENT '处理状态：PENDING-未入库, INDEXED-已入库, SLICING-正在切片, VECTORIZING-正在向量化, EXPIRED-已过期',
  `process_message` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '处理信息/错误消息',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_upload_user_id`(`upload_user_id`) USING BTREE,
  INDEX `idx_dept_id`(`dept_id`) USING BTREE,
  INDEX `idx_status`(`status`) USING BTREE,
  INDEX `idx_create_time`(`create_time`) USING BTREE,
  INDEX `idx_is_public`(`is_public`) USING BTREE,
  INDEX `idx_file_category`(`file_category`) USING BTREE,
  INDEX `idx_audit_status`(`audit_status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 40 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文件管理表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of file
-- ----------------------------
INSERT INTO `file` VALUES (1, '常用命令.docx', '.\\uploads\\resources\\rule\\人事部门\\常用命令\\v1\\常用命令.docx', 16844, 'application/vnd.openxmlformats-officedocument.word', '.docx', NULL, 8, 6, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-16 19:42:01', '2026-04-16 19:42:01', 'INDEXED', NULL);
INSERT INTO `file` VALUES (2, '2025招聘制度.docx', '.\\uploads/resources/rule/人事部门/2025招聘制度/v1/2025招聘制度.docx', 0, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', '.docx', NULL, NULL, 6, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-16 21:06:38', '2026-04-22 09:32:26', 'INDEXED', NULL);
INSERT INTO `file` VALUES (3, '2025招聘制度题目.txt', '.\\uploads/resources/rule/人事部门/2025招聘制度/v1/2025招聘制度题目.txt', 0, 'text/plain', '.txt', NULL, NULL, 6, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-16 21:06:38', '2026-04-22 09:32:29', 'INDEXED', NULL);
INSERT INTO `file` VALUES (4, '2025招聘制度.docx', '.\\uploads/resources/rule/人事部门/2025招聘制度/v2/2025招聘制度.docx', 0, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', '.docx', NULL, NULL, 6, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-16 21:06:38', '2026-04-22 09:32:32', 'INDEXED', NULL);
INSERT INTO `file` VALUES (5, '2025招聘制度题目.txt', '.\\uploads/resources/rule/人事部门/2025招聘制度/v2/2025招聘制度题目.txt', 0, 'text/plain', '.txt', NULL, NULL, 6, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-16 21:06:38', '2026-04-22 09:32:34', 'INDEXED', NULL);
INSERT INTO `file` VALUES (6, '2026招聘制度.docx', '.\\uploads/resources/rule/人事部门/2026招聘制度/v1/2026招聘制度.docx', 0, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', '.docx', NULL, NULL, 6, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-16 21:06:38', '2026-04-22 09:32:37', 'INDEXED', NULL);
INSERT INTO `file` VALUES (7, '2026招聘制度题目.txt', '.\\uploads/resources/rule/人事部门/2026招聘制度/v1/2026招聘制度题目.txt', 0, 'text/plain', '.txt', NULL, NULL, 6, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-16 21:06:38', '2026-04-22 09:32:40', 'INDEXED', NULL);
INSERT INTO `file` VALUES (8, '常用命令.docx', '.\\uploads/resources/rule/人事部门/常用命令/v1/常用命令.docx', 0, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', '.docx', NULL, NULL, 6, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-16 21:06:38', '2026-04-22 09:32:42', 'INDEXED', NULL);
INSERT INTO `file` VALUES (9, '迟到.txt', '.\\uploads/resources/rule/公共/关于迟到/v1/迟到.txt', 0, 'text/plain', '.txt', NULL, NULL, 7, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-16 21:06:39', '2026-04-22 09:32:44', 'INDEXED', NULL);
INSERT INTO `file` VALUES (10, '迟到.txt', '.\\uploads/resources/rule/公共/关于迟到/v2/迟到.txt', 0, 'text/plain', '.txt', NULL, NULL, 7, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-16 21:06:39', '2026-04-22 09:32:47', 'INDEXED', NULL);
INSERT INTO `file` VALUES (11, '迟到.txt', '.\\uploads/resources/rule/公共/关于迟到/v3/迟到.txt', 0, 'text/plain', '.txt', NULL, NULL, 7, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-16 21:06:39', '2026-04-22 09:32:49', 'INDEXED', NULL);
INSERT INTO `file` VALUES (12, '惩罚制度.docx', '.\\uploads/resources/rule/管理部门/惩罚制度/v1/惩罚制度.docx', 0, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', '.docx', NULL, NULL, 5, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-16 21:06:39', '2026-04-22 09:32:51', 'INDEXED', NULL);
INSERT INTO `file` VALUES (13, '惩罚制度题目.txt', '.\\uploads/resources/rule/管理部门/惩罚制度/v1/惩罚制度题目.txt', 0, 'text/plain', '.txt', NULL, NULL, 5, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-16 21:06:39', '2026-04-22 09:32:55', 'INDEXED', NULL);
INSERT INTO `file` VALUES (14, '采购规范.json', '.\\uploads/resources/rule/采购部门/采购规范/v1/采购规范.json', 0, 'application/json', '.json', NULL, NULL, 4, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-16 21:06:39', '2026-04-22 09:32:57', 'INDEXED', NULL);
INSERT INTO `file` VALUES (15, '采购规范.pdf', '.\\uploads/resources/rule/采购部门/采购规范/v1/采购规范.pdf', 0, 'application/pdf', '.pdf', NULL, NULL, 4, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-16 21:06:39', '2026-04-22 09:33:01', 'INDEXED', NULL);
INSERT INTO `file` VALUES (16, '私人文件.txt', '.\\uploads/resources/user/admin/private/私人文件.txt', 0, 'text/plain', '.txt', NULL, 1, NULL, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-16 21:06:39', '2026-04-22 09:33:02', 'INDEXED', NULL);
INSERT INTO `file` VALUES (17, '公开文件.txt', '.\\uploads/resources/user/admin/public/公开文件.txt', 0, 'text/plain', '.txt', NULL, 1, NULL, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-16 21:06:39', '2026-04-22 09:33:07', 'INDEXED', NULL);
INSERT INTO `file` VALUES (18, '一号笔记.json', 'uploads/resources/user/dept_admin/2025招聘制度/一号笔记.json', 0, 'application/json', '.json', NULL, 2, NULL, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-16 21:06:39', '2026-04-16 21:06:39', 'INDEXED', NULL);
INSERT INTO `file` VALUES (19, '二号笔记.json', 'uploads/resources/user/dept_admin/2025招聘制度/二号笔记.json', 0, 'application/json', '.json', NULL, 2, NULL, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-16 21:06:39', '2026-04-16 21:06:39', 'INDEXED', NULL);
INSERT INTO `file` VALUES (20, '我的笔记.json', 'uploads/resources/user/dept_admin/2026招聘制度/我的笔记.json', 0, 'application/json', '.json', NULL, 2, NULL, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-16 21:06:39', '2026-04-16 21:06:39', 'INDEXED', NULL);
INSERT INTO `file` VALUES (21, '我我我的笔记.json', 'uploads/resources/user/user/奖励制度/我我我的笔记.json', 0, 'application/json', '.json', NULL, 3, NULL, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-16 21:06:39', '2026-04-16 21:06:39', 'INDEXED', NULL);
INSERT INTO `file` VALUES (22, '货源投放制度.docx', '.\\uploads\\resources\\rule\\采购部门\\货源投放制度\\v2\\货源投放制度.docx', 483352, 'application/vnd.openxmlformats-officedocument.word', '.docx', NULL, 7, 6, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-18 15:34:31', '2026-04-27 09:36:53', 'INDEXED', NULL);
INSERT INTO `file` VALUES (23, '江苏省公司文明吸烟环境建设标准.docx', '.\\uploads\\resources\\rule\\公共部门\\江苏省公司文明吸烟环境建设标准\\v1\\江苏省公司文明吸烟环境建设标准.docx', 775988, 'application/vnd.openxmlformats-officedocument.word', '.docx', NULL, 9, 7, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-18 15:36:57', '2026-04-27 09:36:53', 'INDEXED', NULL);
INSERT INTO `file` VALUES (24, '文明吸烟环境建设标准.docx', '.\\uploads\\resources\\rule\\公共部门\\文明吸烟环境建设标准\\v1\\文明吸烟环境建设标准.docx', 1454500, 'application/vnd.openxmlformats-officedocument.word', '.docx', NULL, 9, 7, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-18 15:37:29', '2026-04-27 09:36:53', 'INDEXED', NULL);
INSERT INTO `file` VALUES (25, '文明吸烟环境建设标准.docx', '.\\uploads\\resources\\rule\\公共部门\\文明吸烟环境建设标准\\v2\\文明吸烟环境建设标准.docx', 1454500, 'application/vnd.openxmlformats-officedocument.word', '.docx', NULL, 9, 7, 1, 'personal', NULL, 1, 0, NULL, 0, '2026-04-18 15:41:36', '2026-04-27 09:36:53', 'INDEXED', NULL);
INSERT INTO `file` VALUES (26, 'API 接口测试报告.docx', './uploads/resources/rule/默认部门/API 接口测试报告/v1/API 接口测试报告.docx', 4101377, 'application/octet-stream', '.docx', NULL, 1, NULL, 1, 'personal', NULL, 1, 1, NULL, 0, '2026-04-22 08:04:10', '2026-04-22 08:04:09', 'INDEXED', NULL);
INSERT INTO `file` VALUES (27, 'a.pdf', '.\\uploads\\resources\\user\\user_4\\public\\a\\v2\\a.pdf', 539187, 'application/octet-stream', '.pdf', NULL, 4, 7, 1, 'rule', NULL, 1, 1, NULL, 0, '2026-04-22 08:10:24', '2026-04-27 09:36:53', 'INDEXED', NULL);
INSERT INTO `file` VALUES (28, '新建 文本文档.txt', 'app/uploads/resources/user/user_6/pending/新建 文本文档/v1/新建 文本文档.txt', 16, 'application/octet-stream', '.txt', NULL, 6, 5, 0, 'personal', NULL, 1, 0, NULL, 0, '2026-04-28 08:13:06', '2026-04-28 08:13:06', 'INDEXED', NULL);
INSERT INTO `file` VALUES (29, '新建 文本文档.txt', 'app/uploads/resources/user/user_6/pending/新建 文本文档/v2/新建 文本文档.txt', 16, 'application/octet-stream', '.txt', NULL, 6, 5, 0, 'personal', NULL, 1, 0, NULL, 0, '2026-04-28 08:14:55', '2026-04-28 08:14:54', 'INDEXED', NULL);
INSERT INTO `file` VALUES (30, '新建 文本文档.txt', 'app/uploads/resources/user/user_3/pending/新建 文本文档/v1/新建 文本文档.txt', 16, 'application/octet-stream', '.txt', NULL, 6, 5, 0, 'personal', NULL, 1, 0, NULL, 0, '2026-04-28 08:16:25', '2026-04-28 08:16:24', 'INDEXED', NULL);
INSERT INTO `file` VALUES (31, '新建 文本文档.txt', 'app/uploads/resources/user/user_3/pending/新建 文本文档/v2/新建 文本文档.txt', 16, 'application/octet-stream', '.txt', NULL, 6, 5, 0, 'personal', NULL, 1, 0, NULL, 0, '2026-04-28 08:16:58', '2026-04-28 08:16:58', 'INDEXED', NULL);
INSERT INTO `file` VALUES (32, '06-css-styling.pdf', 'app/uploads/resources/user/user_2/pending/06-css-styling/v1/06-css-styling.pdf', 1641996, 'application/octet-stream', '.pdf', NULL, 5, 4, 0, 'personal', NULL, 1, 0, NULL, 0, '2026-04-28 08:18:26', '2026-04-28 08:18:25', 'INDEXED', NULL);
INSERT INTO `file` VALUES (33, 'IMG_7182.PNG', 'app/uploads/resources/rule/总公司/南京分公司/管理部门/IMG_7182/v1/IMG_7182.PNG', 3534329, 'application/octet-stream', '.PNG', NULL, 1, 5, 1, 'rule', NULL, 1, 1, NULL, 0, '2026-04-29 08:43:48', '2026-04-29 08:43:48', 'INDEXED', NULL);
INSERT INTO `file` VALUES (34, 'IMG_7182.PNG', 'app/uploads/resources/rule/默认部门/IMG_7182/v1/IMG_7182.PNG', 3534329, 'application/octet-stream', '.PNG', NULL, 1, NULL, 1, 'personal', NULL, 1, 1, NULL, 0, '2026-04-29 08:44:08', '2026-04-29 08:44:08', 'INDEXED', NULL);
INSERT INTO `file` VALUES (35, 'IMG_7182.PNG', 'app/uploads/resources/rule/总公司/南京分公司/IMG_7182/v1/IMG_7182.PNG', 3534329, 'application/octet-stream', '.PNG', NULL, 1, 2, 1, 'personal', NULL, 1, 1, NULL, 0, '2026-04-29 08:47:03', '2026-04-29 08:47:03', 'INDEXED', NULL);
INSERT INTO `file` VALUES (36, 'IMG_7182.PNG', 'app/uploads/resources/rule/总公司/南京分公司/采购部门/IMG_7182/v1/IMG_7182.PNG', 3534329, 'application/octet-stream', '.PNG', NULL, 1, 4, 1, 'rule', NULL, 1, 1, NULL, 0, '2026-04-29 08:49:31', '2026-04-29 08:49:31', 'INDEXED', NULL);
INSERT INTO `file` VALUES (37, '智慧城市平台Open API_V.3.0.pdf', 'app/uploads/resources/rule/总公司/智慧城市平台Open API_V.3.0/v1/智慧城市平台Open API_V.3.0.pdf', 2500133, 'application/pdf', '.pdf', NULL, 1, 1, 0, 'rule', NULL, 1, 1, NULL, 0, '2026-05-01 21:27:59', '2026-05-01 21:27:58', 'INDEXED', NULL);
INSERT INTO `file` VALUES (38, '智慧城市平台Open API_V.3.0.pdf', 'app/uploads/resources/rule/总公司/南京分公司/智慧城市平台Open API_V.3.0/v1/智慧城市平台Open API_V.3.0.pdf', 2500133, 'application/pdf', '.pdf', NULL, 1, 2, 1, 'rule', NULL, 1, 1, NULL, 0, '2026-05-02 16:37:55', '2026-05-02 16:37:54', 'INDEXED', NULL);
INSERT INTO `file` VALUES (39, '移动应用开发赛项竞赛-样题.pdf', './uploads/resources/rule/总公司/移动应用开发赛项竞赛-样题/v1/移动应用开发赛项竞赛-样题.pdf', 382799, 'application/pdf', '.pdf', NULL, 1, 1, 1, 'rule', NULL, 0, 1, NULL, 0, '2026-05-02 17:23:27', '2026-05-02 17:34:10', 'INDEXED', NULL);

SET FOREIGN_KEY_CHECKS = 1;
