/*
 Navicat Premium Data Transfer

 Source Server         : 192.168.92.61-lq-db
 Source Server Type    : MySQL
 Source Server Version : 80035
 Source Host           : 192.168.92.61:13306
 Source Schema         : lq_oauth_db

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

 Date: 18/01/2026 21:42:50
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for app_permissions
-- ----------------------------
DROP TABLE IF EXISTS `app_permissions`;
CREATE TABLE `app_permissions`  (
  `app_id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '应用ID',
  `permission_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '权限代码',
  `permission_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '权限名称',
  `description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '权限描述',
  `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '主键ID',
  `created_at` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  `updated_at` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
  `is_deleted` tinyint(1) NULL DEFAULT NULL COMMENT '是否删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `app_id`(`app_id`) USING BTREE,
  CONSTRAINT `app_permissions_ibfk_1` FOREIGN KEY (`app_id`) REFERENCES `apps` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of app_permissions
-- ----------------------------

-- ----------------------------
-- Table structure for apps
-- ----------------------------
DROP TABLE IF EXISTS `apps`;
CREATE TABLE `apps`  (
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '应用名称',
  `app_key` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '应用Key',
  `app_secret` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '应用Secret',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '应用描述',
  `icon_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '应用图标',
  `redirect_uris` json NOT NULL COMMENT '回调URL列表',
  `scope` json NULL COMMENT '权限范围',
  `is_active` tinyint(1) NULL DEFAULT NULL COMMENT '是否激活',
  `is_trusted` tinyint(1) NULL DEFAULT NULL COMMENT '是否受信任应用',
  `access_token_expires` int(0) NULL DEFAULT NULL COMMENT '访问令牌过期时间(秒)',
  `refresh_token_expires` int(0) NULL DEFAULT NULL COMMENT '刷新令牌过期时间(秒)',
  `created_by` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '创建者ID',
  `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '主键ID',
  `created_at` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  `updated_at` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
  `is_deleted` tinyint(1) NULL DEFAULT NULL COMMENT '是否删除',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `app_key`(`app_key`) USING BTREE,
  INDEX `created_by`(`created_by`) USING BTREE,
  CONSTRAINT `apps_ibfk_1` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of apps
-- ----------------------------
INSERT INTO `apps` VALUES ('test', 'WviiGL8KQE20tQhmhQPQhhJ5QpFK51F6', '9WXP88hEHJiHRSiUdmx7ip5oQPzY0bnJNsEswQoO4sk6juCplyJTcnAiZsv7e3lJ', '测试', '', '[\"http://www.test.com/callback\", \"http://192.168.1.12:8001/callback\"]', '[\"profile\", \"email\", \"phone\", \"roles\"]', 1, 0, 7200, 2592000, 'ed6a79d3-0083-4d81-8b48-fc522f686f74', '05b36e43-fe4b-4d72-9271-a24bd2195fa1', '2025-12-21 22:03:52', '2025-12-21 22:04:32', NULL);
INSERT INTO `apps` VALUES ('子系统案例应用', 'eqhoIdAyAWbA8MsYHsNqQqNLJbCayTjY', '0070ebeYOmYQU28T85nkpedikDd6kBbkZ6LxVJzgznJvrb83HzcfOB1LCOwio4ML', '这是编辑功能的测试描述up', 'https://example.com/test-icon.png', '[\"http://localhost:3001/callback\", \"http://localhost:8001/auth/callback\"]', '[\"profile\", \"email\", \"openid\"]', 1, 0, 3600, 1800000, 'ed6a79d3-0083-4d81-8b48-fc522f686f74', 'b0886209-7eb8-433e-82ac-2a19d947215b', '2025-12-20 13:53:13', '2025-12-22 10:08:47', 0);
INSERT INTO `apps` VALUES ('app-1', 'j2e3i6psnhyQUEwso8t3m4Obx14q2MhJ', 'RRVZBviuHm4M3Rm05kvk2h2iXwFxiusIJxA3KuzhetFvJzZ5W8cQtJ7QsEDmP14c', '应用1', '', '[\"http://192.168.12/app1\"]', '[\"profile\", \"email\"]', 1, 0, 7200, 2592000, '357f8ac2-a271-440a-a003-0db32d15d302', 'c956ab97-641a-4327-8b08-5332549be104', '2025-12-29 22:26:36', '2025-12-29 22:26:36', NULL);

-- ----------------------------
-- Table structure for doc_categories
-- ----------------------------
DROP TABLE IF EXISTS `doc_categories`;
CREATE TABLE `doc_categories`  (
  `id` int(0) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `parent_id` int(0) NULL DEFAULT NULL,
  `created_at` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
  `updated_at` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0),
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `parent_id`(`parent_id`) USING BTREE,
  CONSTRAINT `doc_categories_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `doc_categories` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of doc_categories
-- ----------------------------
INSERT INTO `doc_categories` VALUES (1, '技术文档', NULL, '2026-01-07 19:06:17', '2026-01-07 19:06:17');
INSERT INTO `doc_categories` VALUES (2, '业务文档', NULL, '2026-01-07 19:06:17', '2026-01-07 19:06:17');
INSERT INTO `doc_categories` VALUES (3, '行政管理', NULL, '2026-01-07 19:06:17', '2026-01-07 19:06:17');
INSERT INTO `doc_categories` VALUES (4, '前端开发', 1, '2026-01-07 19:06:18', '2026-01-07 19:06:18');
INSERT INTO `doc_categories` VALUES (5, '后端开发', 1, '2026-01-07 19:06:18', '2026-01-07 19:06:18');
INSERT INTO `doc_categories` VALUES (6, '移动端', 1, '2026-01-07 19:06:18', '2026-01-07 19:06:18');
INSERT INTO `doc_categories` VALUES (7, '市场调研', 2, '2026-01-07 19:06:18', '2026-01-07 19:06:18');
INSERT INTO `doc_categories` VALUES (8, '产品设计', 2, '2026-01-07 19:06:18', '2026-01-07 19:06:18');
INSERT INTO `doc_categories` VALUES (9, '规章制度', 3, '2026-01-07 19:06:18', '2026-01-07 19:06:18');
INSERT INTO `doc_categories` VALUES (10, '人事通知', 3, '2026-01-07 19:06:18', '2026-01-07 19:06:18');

-- ----------------------------
-- Table structure for documents
-- ----------------------------
DROP TABLE IF EXISTS `documents`;
CREATE TABLE `documents`  (
  `id` int(0) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL,
  `primary_category_id` int(0) NULL DEFAULT NULL,
  `secondary_category_id` int(0) NULL DEFAULT NULL,
  `created_at` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
  `updated_at` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0),
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `primary_category_id`(`primary_category_id`) USING BTREE,
  INDEX `secondary_category_id`(`secondary_category_id`) USING BTREE,
  CONSTRAINT `documents_ibfk_1` FOREIGN KEY (`primary_category_id`) REFERENCES `doc_categories` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `documents_ibfk_2` FOREIGN KEY (`secondary_category_id`) REFERENCES `doc_categories` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of documents
-- ----------------------------
INSERT INTO `documents` VALUES (1, 'React 最佳实践', 'React 最佳实践内容...', 1, 4, '2026-01-07 19:06:18', '2026-01-07 19:06:18');
INSERT INTO `documents` VALUES (2, 'FastAPI 入门指南', 'FastAPI 入门指南内容...', 1, 5, '2026-01-07 19:06:18', '2026-01-07 19:06:18');
INSERT INTO `documents` VALUES (3, '2026 市场规划', '2026 市场规划内容...', 2, 7, '2026-01-07 19:06:18', '2026-01-07 19:06:18');

-- ----------------------------
-- Table structure for knowledge_base
-- ----------------------------
DROP TABLE IF EXISTS `knowledge_base`;
CREATE TABLE `knowledge_base`  (
  `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `collection_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL,
  `status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'normal',
  `document_count` int(0) NULL DEFAULT 0,
  `created_at` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
  `updated_at` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0),
  `is_deleted` tinyint(1) NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `collection_name`(`collection_name`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of knowledge_base
-- ----------------------------
INSERT INTO `knowledge_base` VALUES ('0153b231-ef97-4b62-be26-4a96ec6fb043', 'test', 'test', '自动同步\n', 'normal', 0, '2026-01-15 11:00:52', '2026-01-15 14:57:59', 0);
INSERT INTO `knowledge_base` VALUES ('0e17e98c-40b5-4029-a962-d3cbfeed2a26', 'rag_parent_hybrid_test', 'rag_parent_hybrid_test', '自动同步', 'normal', 15, '2026-01-15 11:00:52', '2026-01-15 11:00:52', 0);
INSERT INTO `knowledge_base` VALUES ('32c6a9db-f608-4644-a244-f10aaeb148ca', 'rag_knowledge_test_kb_children', 'rag_knowledge_test_kb_children', '自动同步', 'normal', 40, '2026-01-15 11:00:52', '2026-01-15 11:00:52', 0);
INSERT INTO `knowledge_base` VALUES ('36cb037e-de57-402a-8f5a-1103d62f88a4', 'lq_1111', 'tes', 'w', 'normal', 0, '2026-01-15 09:54:15', '2026-01-15 10:15:57', 1);
INSERT INTO `knowledge_base` VALUES ('3c013f39-6cc4-4b84-abec-1b361f882625', 'first_bfp_collection_entity', 'first_bfp_collection_entity', '自动同步', 'normal', 116277, '2026-01-15 11:00:52', '2026-01-15 11:00:52', 0);
INSERT INTO `knowledge_base` VALUES ('6ed158f2-6221-4433-9c0d-6cfe1d8c3683', 'first_bfp_collection_status', 'first_bfp_collection_status', '自动同步', 'normal', 146, '2026-01-15 11:00:52', '2026-01-15 11:00:52', 0);
INSERT INTO `knowledge_base` VALUES ('933e7c06-e807-44e8-b220-bcebbfe4e0cc', '_test_children', '_test_children', '自动同步', 'normal', 22, '2026-01-15 11:00:52', '2026-01-15 11:00:52', 0);
INSERT INTO `knowledge_base` VALUES ('9bb4f03a-1020-4867-8adc-93404bf0f8bd', 'kb_111111', 's', 'w', 'normal', 0, '2026-01-15 10:38:33', '2026-01-15 10:38:33', 0);
INSERT INTO `knowledge_base` VALUES ('c4808ddf-9655-422b-ad5a-0df554a3569c', 'rag_parent_hybrid', 'rag_parent_hybrid', '自动同步', 'normal', 7109, '2026-01-15 11:00:52', '2026-01-15 11:00:52', 0);
INSERT INTO `knowledge_base` VALUES ('c7558f61-b333-4788-8d27-c8a3f096de91', 'rag_children_hybrid', 'rag_children_hybrid', '自动同步', 'normal', 56328, '2026-01-15 11:00:52', '2026-01-15 11:00:52', 0);
INSERT INTO `knowledge_base` VALUES ('cf88a9ea-7c05-4534-a650-1bca6b273705', 'rag_knowledge_test_children', 'rag_knowledge_test_children', '自动同步', 'normal', 111, '2026-01-15 11:00:52', '2026-01-15 11:00:52', 0);
INSERT INTO `knowledge_base` VALUES ('df7025b9-f5a1-4ba8-ad71-74699c7fc6be', 'rag_children_hybrid_test', 'rag_children_hybrid_test', '自动同步', 'normal', 241, '2026-01-15 11:00:52', '2026-01-15 11:00:52', 0);
INSERT INTO `knowledge_base` VALUES ('fc25ceeb-9875-49d8-aa88-74ca338694ef', 'kb_123123', 'testtest', 'wu', 'normal', 0, '2026-01-14 16:34:11', '2026-01-14 16:34:11', 0);

-- ----------------------------
-- Table structure for login_logs
-- ----------------------------
DROP TABLE IF EXISTS `login_logs`;
CREATE TABLE `login_logs`  (
  `user_id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '用户ID',
  `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '用户名',
  `login_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '登录方式',
  `ip_address` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'IP地址',
  `user_agent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '用户代理',
  `success` tinyint(1) NULL DEFAULT NULL COMMENT '是否成功',
  `failure_reason` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '失败原因',
  `login_at` datetime(0) NULL DEFAULT NULL COMMENT '登录时间',
  `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '主键ID',
  `created_at` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  `updated_at` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
  `is_deleted` tinyint(1) NULL DEFAULT NULL COMMENT '是否删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  CONSTRAINT `login_logs_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of login_logs
-- ----------------------------

-- ----------------------------
-- Table structure for menus
-- ----------------------------
DROP TABLE IF EXISTS `menus`;
CREATE TABLE `menus`  (
  `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'uuid()',
  `parent_id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '菜单名称',
  `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '菜单标题',
  `path` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '菜单路径',
  `component` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '组件路径',
  `icon` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '菜单图标',
  `sort_order` int(0) NULL DEFAULT 0 COMMENT '排序顺序',
  `menu_type` enum('menu','button') CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'menu' COMMENT '菜单类型',
  `is_hidden` tinyint(1) NULL DEFAULT 0 COMMENT '是否隐藏',
  `is_active` tinyint(1) NULL DEFAULT 1 COMMENT '是否启用',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '菜单描述',
  `created_at` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
  `updated_at` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0),
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_parent_id`(`parent_id`) USING BTREE,
  INDEX `idx_path`(`path`) USING BTREE,
  INDEX `idx_sort_order`(`sort_order`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '系统菜单表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of menus
-- ----------------------------
INSERT INTO `menus` VALUES ('admin-dashboard', 'admin-main', 'admin-dashboard', '管理概览', '/admin/dashboard', 'admin/Dashboard', 'Monitor', 1, 'menu', 0, 1, '管理员仪表盘', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('admin-dashboard-app-mgmt-btn', 'admin-dashboard', 'admin-dashboard-app-mgmt', '应用管理', NULL, NULL, 'Grid', 3, 'button', 0, 1, '快速跳转到应用管理', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('admin-dashboard-create-app-btn', 'admin-dashboard', 'admin-dashboard-create-app', '创建应用', NULL, NULL, 'Plus', 4, 'button', 0, 1, '快速创建应用', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('admin-dashboard-create-user-btn', 'admin-dashboard', 'admin-dashboard-create-user', '创建用户', NULL, NULL, 'Plus', 2, 'button', 0, 1, '快速创建用户', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('admin-dashboard-export-logs-btn', 'admin-dashboard', 'admin-dashboard-export-logs', '导出日志', NULL, NULL, 'Download', 6, 'button', 0, 1, '快速导出日志', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('admin-dashboard-settings-btn', 'admin-dashboard', 'admin-dashboard-settings', '系统设置', NULL, NULL, 'Tools', 7, 'button', 0, 1, '快速跳转到系统设置', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('admin-dashboard-user-mgmt-btn', 'admin-dashboard', 'admin-dashboard-user-mgmt', '用户管理', NULL, NULL, 'UserFilled', 1, 'button', 0, 1, '快速跳转到用户管理', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('admin-dashboard-view-logs-btn', 'admin-dashboard', 'admin-dashboard-view-logs', '查看日志', NULL, NULL, 'View', 5, 'button', 0, 1, '快速查看系统日志', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('admin-main', NULL, 'admin', '系统管理', '/admin', NULL, 'Setting', 3, 'menu', 0, 1, '系统管理功能', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('app-create-btn', 'app-management', 'app-create', '创建应用', NULL, NULL, 'Plus', 1, 'button', 0, 1, '创建OAuth2应用', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('app-delete-btn', 'app-management', 'app-delete', '删除应用', NULL, NULL, 'Delete', 3, 'button', 0, 1, '删除应用', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('app-edit-btn', 'app-management', 'app-edit', '编辑应用', NULL, NULL, 'Edit', 2, 'button', 0, 1, '编辑应用信息', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('app-management', 'admin-main', 'app-management', '应用管理', '/admin/apps', 'admin/Apps', 'Grid', 6, 'menu', 0, 1, '接入应用管理', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('app-reset-secret-btn', 'app-management', 'app-reset-secret', '重置密钥', NULL, NULL, 'RefreshRight', 5, 'button', 0, 1, '重置应用密钥', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('app-view-logs-btn', 'app-management', 'app-view-logs', '查看日志', NULL, NULL, 'Document', 6, 'button', 0, 1, '查看应用相关日志', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('app-view-secret-btn', 'app-management', 'app-view-secret', '查看密钥', NULL, NULL, 'View', 4, 'button', 0, 1, '查看应用密钥', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('basic-inf-delete-btn', 'basic-inf-management', 'basic-inf-delete', '删除信息', '/admin/basic-inf/delete', NULL, 'Delete', 2, 'button', 0, 1, NULL, '2026-01-12 16:35:09', '2026-01-12 16:45:28');
INSERT INTO `menus` VALUES ('basic-info-basis', 'basic-info-main', 'basic-info-basis', '编制依据', '/admin/basic-info/basis', 'basic-info/Basis', 'Document', 1, 'menu', 0, 1, '编制依据管理', '2026-01-12 16:50:02', '2026-01-12 16:50:02');
INSERT INTO `menus` VALUES ('basic-info-job', 'basic-info-main', 'basic-info-job', '办公制度', '/admin/basic-info/job', 'basic-info/Job', 'DocumentCopy', 3, 'menu', 0, 1, '办公制度管理', '2026-01-12 16:50:02', '2026-01-12 16:50:02');
INSERT INTO `menus` VALUES ('basic-info-main', NULL, 'basic-info', '基本信息', '/admin/basic-info', 'layout/MainLayout', 'InfoFilled', 5, 'menu', 0, 1, '基本信息管理模块', '2026-01-12 16:50:02', '2026-01-12 16:50:02');
INSERT INTO `menus` VALUES ('basic-info-management', '', 'basic-info-management', '基本信息管理', '/admin/basic-info', NULL, 'Basic-inf', 4, 'menu', 0, 1, NULL, '2026-01-12 16:30:24', '2026-01-12 17:03:44');
INSERT INTO `menus` VALUES ('basic-info-search', 'basic-info-management', 'basic-info-search', '检索信息', '/admin/basic-info/search', NULL, 'Search', 2, 'button', 0, 1, NULL, '2026-01-12 16:37:45', '2026-01-12 17:04:06');
INSERT INTO `menus` VALUES ('basic-info-work', 'basic-info-main', 'basic-info-work', '施工方案', '/admin/basic-info/work', 'basic-info/Work', 'Files', 2, 'menu', 0, 1, '施工方案管理', '2026-01-12 16:50:02', '2026-01-12 16:50:02');
INSERT INTO `menus` VALUES ('chunk-management-btn', NULL, 'chunk-management', '知识片段管理', '/admin/documents/snippet', 'documents/KnowledgeSnippet', 'Star', 5, 'menu', 0, 1, NULL, '2026-01-15 14:28:16', '2026-01-15 15:09:45');
INSERT INTO `menus` VALUES ('dashboard-main', NULL, 'dashboard', '仪表盘', '/dashboard', 'dashboard/Index', 'House', 1, 'menu', 0, 1, '系统概览和统计信息', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('document-change-btn', 'document-management', 'document-change', '文档转换', '/admin/document/change', NULL, 'change', 2, 'button', 0, 1, NULL, '2026-01-09 15:51:43', '2026-01-09 15:51:43');
INSERT INTO `menus` VALUES ('document-delete-btn', 'document-management', 'document-delete', '删除文档', 'admin/documents/delete', 'documents/Index', 'Delete', 4, 'button', 0, 1, '删除文档', '2026-01-06 17:46:30', '2026-01-09 11:18:59');
INSERT INTO `menus` VALUES ('document-edit-btn', 'document-management', 'document-edit', '编辑文档', '/admin/documents/edit', NULL, NULL, 5, 'button', 0, 1, NULL, '2026-01-15 11:17:52', '2026-01-15 11:17:52');
INSERT INTO `menus` VALUES ('document-enter-btn', 'document-management', 'document-enter', '文档入库', '/admin/documents/batch-enter', 'documents/Index', 'Enter', 2, 'button', 0, 1, NULL, '2026-01-09 11:10:51', '2026-01-09 11:40:22');
INSERT INTO `menus` VALUES ('document-management', NULL, 'document-management', '文档管理中心', '/admin/documents', 'documents/Index', 'Document', 4, 'menu', 0, 1, '企业文档管理中心', '2026-01-06 17:46:30', '2026-01-09 11:03:53');
INSERT INTO `menus` VALUES ('document-search-btn', 'document-management', 'document-search', '文档检索', '/admin/documents/search', 'documents/Index', 'Search', 2, 'button', 0, 1, '文档检索', '2026-01-09 11:09:42', '2026-01-09 11:40:11');
INSERT INTO `menus` VALUES ('document-upload-btn', 'document-management', 'document-upload', '上传文档', '/admin/documents/upload', 'documents/Index', 'Upload', 2, 'button', 0, 1, '上传新文档', '2026-01-06 17:46:30', '2026-01-09 11:04:30');
INSERT INTO `menus` VALUES ('document-view-btn', 'document-management', 'document-view', '查看文档', '/admin/documents/view', 'documents/Index', 'View', 1, 'button', 0, 1, '查看文档列表和详情', '2026-01-06 17:46:30', '2026-01-09 11:04:58');
INSERT INTO `menus` VALUES ('kb-management-btn', NULL, 'kb-management', '知识库管理中心', '/admin/documents/kb', 'documents/KnowledgeBase', 'Star', 5, 'menu', 0, 1, '知识库管理中心', '2026-01-06 17:46:30', '2026-01-09 15:40:47');
INSERT INTO `menus` VALUES ('log-clear-btn', 'log-management', 'log-clear', '清理日志', NULL, NULL, 'Delete', 3, 'button', 0, 1, '清理历史日志', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('log-export-btn', 'log-management', 'log-export', '导出日志', NULL, NULL, 'Download', 2, 'button', 0, 1, '导出系统日志', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('log-management', 'admin-main', 'log-management', '日志审计', '/admin/logs', 'admin/Logs', 'DocumentCopy', 8, 'menu', 0, 1, '系统日志审计', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('log-view-btn', 'log-management', 'log-view', '查看日志', NULL, NULL, 'View', 1, 'button', 0, 1, '查看系统日志', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('menu-create-btn', 'menu-management', 'menu-create', '创建菜单', NULL, NULL, 'Plus', 1, 'button', 0, 1, '创建新菜单', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('menu-delete-btn', 'menu-management', 'menu-delete', '删除菜单', NULL, NULL, 'Delete', 3, 'button', 0, 1, '删除菜单', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('menu-edit-btn', 'menu-management', 'menu-edit', '编辑菜单', NULL, NULL, 'Edit', 2, 'button', 0, 1, '编辑菜单信息', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('menu-management', 'admin-main', 'menu-management', '菜单管理', '/admin/menus', 'admin/Menus', 'Menu', 4, 'menu', 0, 1, '菜单结构管理', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('menu-sort-btn', 'menu-management', 'menu-sort', '排序菜单', NULL, NULL, 'Sort', 4, 'button', 0, 1, '调整菜单排序', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('permission-create-btn', 'permission-management', 'permission-create', '创建权限', NULL, NULL, 'Plus', 1, 'button', 0, 1, '创建新权限', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('permission-delete-btn', 'permission-management', 'permission-delete', '删除权限', NULL, NULL, 'Delete', 3, 'button', 0, 1, '删除权限', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('permission-edit-btn', 'permission-management', 'permission-edit', '编辑权限', NULL, NULL, 'Edit', 2, 'button', 0, 1, '编辑权限信息', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('permission-management', 'admin-main', 'permission-management', '权限管理', '/admin/permissions', 'admin/Permissions', 'Key', 5, 'menu', 0, 1, '权限配置管理', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('permission-view-roles-btn', 'permission-management', 'permission-view-roles', '查看角色', NULL, NULL, 'View', 4, 'button', 0, 1, '查看权限关联的角色', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('profile-change-password-btn', 'profile-main', 'profile-change-password', '修改密码', NULL, NULL, 'Key', 3, 'button', 0, 1, '修改登录密码', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('profile-main', NULL, 'profile', '个人资料', '/profile', 'user/Profile', 'User', 2, 'menu', 0, 1, '个人信息管理', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('profile-reset-btn', 'profile-main', 'profile-reset', '重置', NULL, NULL, 'RefreshLeft', 2, 'button', 0, 1, '重置个人资料表单', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('profile-save-btn', 'profile-main', 'profile-save', '保存修改', NULL, NULL, 'Check', 1, 'button', 0, 1, '保存个人资料修改', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('role-create-btn', 'role-management', 'role-create', '创建角色', NULL, NULL, 'Plus', 1, 'button', 0, 1, '创建新角色', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('role-delete-btn', 'role-management', 'role-delete', '删除角色', NULL, NULL, 'Delete', 3, 'button', 0, 1, '删除角色', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('role-edit-btn', 'role-management', 'role-edit', '编辑角色', NULL, NULL, 'Edit', 2, 'button', 0, 1, '编辑角色信息', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('role-management', 'admin-main', 'role-management', '角色管理', '/admin/roles', 'admin/Roles', 'Avatar', 3, 'menu', 0, 1, '角色权限管理', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('role-permission-mgmt-btn', 'role-management', 'role-permission-mgmt', '权限管理', NULL, NULL, 'Key', 4, 'button', 0, 1, '管理角色权限', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('settings-edit-btn', 'system-settings', 'settings-edit', '修改设置', NULL, NULL, 'Edit', 2, 'button', 0, 1, '修改系统设置', '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `menus` VALUES ('settings-view-btn', 'system-settings', 'settings-view', '查看设置', NULL, NULL, 'View', 1, 'button', 0, 1, '查看系统设置', '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `menus` VALUES ('system-settings', 'admin-main', 'system-settings', '系统设置', '/admin/settings', 'admin/Settings', 'Tools', 9, 'menu', 0, 1, '系统配置设置', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('user-assign-role-btn', 'user-management', 'user-assign-role', '分配角色', NULL, NULL, 'Avatar', 5, 'button', 0, 1, '为用户分配角色', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('user-batch-delete-btn', 'user-management', 'user-batch-delete', '批量删除用户', NULL, NULL, 'DeleteFilled', 4, 'button', 0, 1, '批量删除用户', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('user-create-btn', 'user-management', 'user-create', '创建用户', NULL, NULL, 'Plus', 1, 'button', 0, 1, '创建新用户', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('user-delete-btn', 'user-management', 'user-delete', '删除用户', NULL, NULL, 'Delete', 3, 'button', 0, 1, '删除用户', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('user-edit-btn', 'user-management', 'user-edit', '编辑用户', NULL, NULL, 'Edit', 2, 'button', 0, 1, '编辑用户信息', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('user-management', 'admin-main', 'user-management', '用户管理', '/admin/users', 'admin/Users', 'UserFilled', 2, 'menu', 0, 1, '用户信息管理', '2026-01-06 17:46:30', '2026-01-06 17:46:30');
INSERT INTO `menus` VALUES ('user-reset-password-btn', 'user-management', 'user-reset-password', '重置密码', NULL, NULL, 'Key', 6, 'button', 0, 1, '重置用户密码', '2026-01-06 17:46:30', '2026-01-06 17:46:30');

-- ----------------------------
-- Table structure for oauth_access_tokens
-- ----------------------------
DROP TABLE IF EXISTS `oauth_access_tokens`;
CREATE TABLE `oauth_access_tokens`  (
  `user_id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '用户ID',
  `app_id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '应用ID',
  `token` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '访问令牌',
  `refresh_token` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '刷新令牌',
  `token_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '令牌类型',
  `scope` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '权限范围',
  `expires_at` datetime(0) NOT NULL COMMENT '过期时间',
  `revoked` tinyint(1) NULL DEFAULT NULL COMMENT '是否撤销',
  `last_used_at` datetime(0) NULL DEFAULT NULL COMMENT '最后使用时间',
  `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '主键ID',
  `created_at` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  `updated_at` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
  `is_deleted` tinyint(1) NULL DEFAULT NULL COMMENT '是否删除',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `token`(`token`) USING BTREE,
  UNIQUE INDEX `refresh_token`(`refresh_token`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `app_id`(`app_id`) USING BTREE,
  CONSTRAINT `oauth_access_tokens_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
  CONSTRAINT `oauth_access_tokens_ibfk_2` FOREIGN KEY (`app_id`) REFERENCES `apps` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of oauth_access_tokens
-- ----------------------------

-- ----------------------------
-- Table structure for oauth_authorization_codes
-- ----------------------------
DROP TABLE IF EXISTS `oauth_authorization_codes`;
CREATE TABLE `oauth_authorization_codes`  (
  `user_id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '用户ID',
  `app_id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '应用ID',
  `code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '授权码',
  `redirect_uri` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '回调URL',
  `scope` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '权限范围',
  `expires_at` datetime(0) NOT NULL COMMENT '过期时间',
  `used` tinyint(1) NULL DEFAULT NULL COMMENT '是否已使用',
  `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '主键ID',
  `created_at` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  `updated_at` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
  `is_deleted` tinyint(1) NULL DEFAULT NULL COMMENT '是否删除',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `code`(`code`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  INDEX `app_id`(`app_id`) USING BTREE,
  CONSTRAINT `oauth_authorization_codes_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
  CONSTRAINT `oauth_authorization_codes_ibfk_2` FOREIGN KEY (`app_id`) REFERENCES `apps` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of oauth_authorization_codes
-- ----------------------------

-- ----------------------------
-- Table structure for operation_logs
-- ----------------------------
DROP TABLE IF EXISTS `operation_logs`;
CREATE TABLE `operation_logs`  (
  `user_id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '用户ID',
  `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '用户名',
  `operation_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '操作类型',
  `target_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '目标类型',
  `target_id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '目标ID',
  `operation_detail` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '操作详情',
  `ip_address` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT 'IP地址',
  `user_agent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '用户代理',
  `operation_time` datetime(0) NULL DEFAULT NULL COMMENT '操作时间',
  `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '主键ID',
  `created_at` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  `updated_at` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
  `is_deleted` tinyint(1) NULL DEFAULT NULL COMMENT '是否删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  CONSTRAINT `operation_logs_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of operation_logs
-- ----------------------------

-- ----------------------------
-- Table structure for permissions
-- ----------------------------
DROP TABLE IF EXISTS `permissions`;
CREATE TABLE `permissions`  (
  `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'uuid()',
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '权限名称',
  `display_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '权限显示名称',
  `resource` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '资源标识',
  `action` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '操作类型',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '权限描述',
  `is_active` tinyint(1) NULL DEFAULT 1 COMMENT '是否启用',
  `created_at` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
  `updated_at` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0),
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `name`(`name`) USING BTREE,
  UNIQUE INDEX `uk_resource_action`(`resource`, `action`) USING BTREE,
  INDEX `idx_name`(`name`) USING BTREE,
  INDEX `idx_resource_action`(`resource`, `action`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '权限表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of permissions
-- ----------------------------
INSERT INTO `permissions` VALUES ('09a31c8e-b298-4fd8-8b38-58a480428f18', 'document.view', '查看文档', 'document', 'view', '查看企业文档', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('0b06cfe7-8dd5-4596-8b70-1aae1fee67f9', 'profile.reset', '重置个人资料', 'profile', 'reset', '重置个人资料表单', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('0f31a263-a067-409a-ad05-641a45e6ed10', 'menu.delete', '删除菜单', 'menu', 'delete', '删除菜单', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('114692ea-89d9-481f-8aef-1df56666b166', 'log.export', '导出系统日志', 'log', 'export', '导出系统日志', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('17264c50-89d4-4ac5-8072-8196324fc561', 'permission.view_roles', '查看权限角色', 'permission', 'view_roles', '查看权限关联的角色', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('218d77b3-123e-4437-a976-be69e27474a8', 'user.edit', '编辑用户', 'user', 'edit', '编辑用户信息', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('24406901-5022-4f96-8afa-8e91c6b6bcbd', 'admin.quick_create_app', '快速创建应用', 'admin', 'quick_create_app', '快速创建应用', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('347cef5d-20c0-46b5-ac9e-489a8049ab20', 'admin.quick_user_mgmt', '快速用户管理', 'admin', 'quick_user_mgmt', '快速跳转到用户管理', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('35dcf1ea-2eeb-4316-bf18-9b92c087a2d7', 'app.view_secret', '查看应用密钥', 'app', 'view_secret', '查看应用密钥', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('37f3e685-f249-4702-a83f-263e8eb2f657', 'menu.view', '查看菜单', 'menu', 'view', '查看菜单列表和详情', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('38ee71e8-0c67-4f76-ac4a-b6a94a101ba4', 'admin.quick_app_mgmt', '快速应用管理', 'admin', 'quick_app_mgmt', '快速跳转到应用管理', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('3bae0593-c9a6-4abd-8cc8-ce396e9fdbd0', 'log.clear', '清理系统日志', 'log', 'clear', '清理历史日志', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('3f70df3e-f26a-41b7-b0f6-5c50aa43c8b7', 'role.view', '查看角色', 'role', 'view', '查看角色列表和详情', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('3ff3cc15-a911-4616-a4ce-51e29c477521', 'admin.quick_export_logs', '快速导出日志', 'admin', 'quick_export_logs', '快速导出日志', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('416647f6-4a64-471c-a42e-1b4fdf2c8a56', 'profile.save', '保存个人资料', 'profile', 'save', '保存个人资料修改', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('44b36fb7-c844-4b2f-9d48-e80b426536b9', 'app.reset_secret', '重置应用密钥', 'app', 'reset_secret', '重置应用密钥', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('5630a397-94fb-4f52-9d3c-b496abc0487b', 'settings.view', '查看系统设置', 'settings', 'view', '查看系统配置', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('59bcc91d-d331-4aff-9390-511821bb326f', 'user.create', '创建用户', 'user', 'create', '创建新用户', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('5cae8f32-f13d-4c2b-a969-cd9de503e9eb', 'admin.dashboard', '管理概览', 'admin', 'dashboard', '查看管理概览', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('5f653d91-e0fe-4650-bda7-1abff5a9d69b', 'log.view', '查看系统日志', 'log', 'view', '查看系统操作日志', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('638e2445-878c-40f7-83be-597972d15cf0', 'user.delete', '删除用户', 'user', 'delete', '删除用户', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('66430840-9192-4906-8665-ccffd3075bd9', 'app.view_logs', '查看应用日志', 'app', 'view_logs', '查看应用相关日志', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('76b46489-6eba-4f76-841c-c088c38e3b1b', 'app.view', '查看应用', 'app', 'view', '查看应用列表和详情', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('8149c1b2-8b73-482e-8214-5e06bc25623b', 'document.delete', '删除文档', 'document', 'delete', '删除文档', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('822ab59c-e4a7-4eb9-b789-848378678710', 'role.create', '创建角色', 'role', 'create', '创建新角色', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('82937e5c-5d37-44fe-84fa-87af20f94a1c', 'admin.quick_create_user', '快速创建用户', 'admin', 'quick_create_user', '快速创建用户', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('926408fe-3ee5-4a41-a524-f3138a235298', 'permission.edit', '编辑权限', 'permission', 'edit', '编辑权限信息', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('9786516e-1908-4fae-801e-c60c9c35b86c', 'document.kb_manage', '知识库管理', 'document', 'kb_manage', '管理文档入库和移除', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('a54a9829-5fb3-44b4-b658-9b4cb30d7d84', 'permission.create', '创建权限', 'permission', 'create', '创建新权限', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('a7e2ceaf-4330-44ba-bf9c-30e09c88e961', 'role.delete', '删除角色', 'role', 'delete', '删除角色', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('a9773815-23d6-4594-85f4-1610bca98ce5', 'profile.change_password', '修改密码', 'profile', 'change_password', '修改登录密码', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('ad24cece-a009-4b22-a4ef-9a4ae0bee265', 'app.delete', '删除应用', 'app', 'delete', '删除应用', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('b43439e6-de46-4b5e-bc78-f23271fbb5b0', 'role.edit', '编辑角色', 'role', 'edit', '编辑角色信息', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('b5ed5637-bb00-4a89-b685-7c63f9305e26', 'admin.quick_settings', '快速系统设置', 'admin', 'quick_settings', '快速跳转到系统设置', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('ba38077d-d8f6-44ce-a70b-be5b693787b5', 'menu.sort', '排序菜单', 'menu', 'sort', '调整菜单排序', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('baca63fe-0e1a-400e-a00a-6b1849b2d694', 'menu.edit', '编辑菜单', 'menu', 'edit', '编辑菜单信息', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('bc51f030-3efe-4544-9a5e-ff42a18318fb', 'user.view', '查看用户', 'user', 'view', '查看用户列表和详情', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('c0f51e32-db23-49fa-8845-1faf6bf9c456', 'permission.delete', '删除权限', 'permission', 'delete', '删除权限', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('c6ea84d4-1429-43ea-aad2-0a0f81156849', 'user.batch_delete', '批量删除用户', 'user', 'batch_delete', '批量删除用户', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('cb92754f-3e32-4a69-aaf2-23f20a4a589f', 'user.assign_role', '分配用户角色', 'user', 'assign_role', '为用户分配角色', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('cee81ef4-d9ea-40eb-bce6-bb9499b21771', 'settings.edit', '修改系统设置', 'settings', 'edit', '修改系统配置', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('d4eb97ca-a2fc-4f69-a264-90f22261da72', 'app.create', '创建应用', 'app', 'create', '创建OAuth2应用', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('e0fe38a3-e905-440c-a90b-00b70a0894bb', 'menu.create', '创建菜单', 'menu', 'create', '创建新菜单', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('e14cf02e-bacd-403b-914b-1af071bdccf4', 'document.add', '上传文档', 'document', 'add', '上传新文档', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('e318b904-a302-4ff3-832e-9e40940029b7', 'role.permission_mgmt', '角色权限管理', 'role', 'permission_mgmt', '管理角色权限', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('eebab12f-135a-4b19-85a9-bfd567fd843c', 'permission.view', '查看权限', 'permission', 'view', '查看权限列表和详情', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('f5b95bba-4d34-4cbd-bb2a-8f3f548b7a89', 'user.reset_password', '重置用户密码', 'user', 'reset_password', '重置用户密码', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('f931de1a-e374-4cbd-8506-1aa4273bf657', 'app.edit', '编辑应用', 'app', 'edit', '编辑应用信息', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `permissions` VALUES ('f945e7b4-8ba6-4ba7-98f9-91ef96ffb267', 'admin.quick_view_logs', '快速查看日志', 'admin', 'quick_view_logs', '快速查看系统日志', 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');

-- ----------------------------
-- Table structure for role_menus
-- ----------------------------
DROP TABLE IF EXISTS `role_menus`;
CREATE TABLE `role_menus`  (
  `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'uuid()',
  `role_id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `menu_id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `created_at` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uk_role_menu`(`role_id`, `menu_id`) USING BTREE,
  INDEX `idx_role_id`(`role_id`) USING BTREE,
  INDEX `idx_menu_id`(`menu_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '角色菜单关联表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of role_menus
-- ----------------------------
INSERT INTO `role_menus` VALUES ('025542ad-a82c-4aa9-9880-3623d2348aac', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'user-delete-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('044357af-626e-45e7-81c8-18912ce09ca8', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'app-management', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('055bd007-7ad3-4052-bb06-2e2ef1e972b1', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'log-export-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('05c2e451-ab8d-46e3-a18c-ed252b1565df', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'app-reset-secret-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('095525da-447a-4fd2-aeb4-6f040cd597e0', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'admin-dashboard-app-mgmt-btn', '2026-01-06 17:46:33');
INSERT INTO `role_menus` VALUES ('0a64a852-c0ba-435c-8f2c-0b265a4e3ea1', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'admin-dashboard-create-app-btn', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('0a7ba548-cb7e-468e-b062-df1ba2416f24', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'profile-reset-btn', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('0b8f58b1-0d46-4f0b-aef5-4fbbb1cb022f', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'permission-delete-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('0ce6cf7e-90f8-4860-9c6b-0427c6e4cb42', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'user-reset-password-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('0e0c8537-d249-4c25-8920-10356227e2c0', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'user-assign-role-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('11e04bb7-587e-436e-8e75-1aa57e3437bd', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'profile-change-password-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('12fbfbaa-73a7-458f-beb3-6c8b67d39b4b', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'app-view-secret-btn', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('135ac295-c689-4bdc-9639-bf59bd57b435', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'system-settings', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('1479bc12-70d2-410c-825c-6f59f904cdd7', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'menu-sort-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('149b7544-c6c0-46f0-bf89-4aaa8d05912e', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'role-create-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('14b15458-bce2-4cda-a8ed-b592d40ee047', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'user-edit-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('14b16fc9-bc6d-44c8-aefa-a79f5152fb6e', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'settings-edit-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('15e6ec6d-f902-4e13-a702-d1f1361c1e89', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'user-create-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('17796cfe-d9b1-4048-a462-931ff140226f', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'app-delete-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('19de2d22-1ff4-44ec-8ce0-58e26559c9b1', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'admin-dashboard-app-mgmt-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('1ea845f2-fe82-4aea-8362-f915bee4b49b', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'admin-dashboard-create-user-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('2099661d-6945-442a-9e9a-803cb6636562', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'profile-change-password-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('20f35868-122f-4c9f-b08b-add550f93b43', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'menu-sort-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('22b0e663-7c1a-47a3-9242-416021524ba5', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'admin-dashboard-create-app-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('23a0f589-27ab-436f-bc4a-34afd7fbe4f6', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'admin-dashboard-view-logs-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('2455f638-74f9-4abd-8be1-e0baec1abffc', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'permission-management', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('25065496-1a6a-47ca-a284-301e9dc2c1cf', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'app-edit-btn', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('26ab2f54-211d-4d5c-9a8b-e69366c1ac75', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'user-batch-delete-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('278090fd-14a1-4c88-8234-4aef7043af4a', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'profile-main', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('28a99e61-8b13-4aa8-8441-d5e61ab149d6', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'user-assign-role-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('29578f5d-b2cb-4d15-a3e4-d36613e9226b', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'admin-main', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('2cde5175-3782-4b9a-a85d-a797fcfd4c73', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'role-edit-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('2ce3a3b7-47ba-431b-8230-36662c592292', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'profile-main', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('2f936c11-df6b-4358-9126-9777f2e324a0', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'admin-dashboard-view-logs-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('2fe26311-ed22-43d2-9029-36c414cf6c87', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'app-view-logs-btn', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('33b6c3fa-fdc9-4e33-8347-e5cf96bc92de', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'user-reset-password-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('34ce7ce8-9c82-45b5-b2b6-550a9433bdba', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'admin-dashboard-settings-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('3787d2fd-f871-4e02-b3e2-dbae8d8201b9', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'user-create-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('3a175a42-4a70-456f-b9b1-8e84afef86a4', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'admin-dashboard-create-user-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('3b88ae50-b15b-4e26-beef-bb1fb9ad5994', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'profile-change-password-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('3bc3852e-2bfc-4f01-9d09-f117df5b8188', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'admin-main', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('3e346075-b83a-438c-889f-7b2958810f09', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'log-export-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('40067b97-fece-4fe7-b405-b0cf7dedc1c3', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'admin-dashboard-export-logs-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('4341f606-c325-44ec-98db-7ce680b98cb4', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'app-management', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('4390aa1c-f4e0-466b-a986-ff2f262bb343', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'menu-edit-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('472281aa-2865-42ad-a9ce-71ec656240be', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'dashboard-main', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('4734b6e2-d08d-4f0c-bd8d-9c6b9d012c22', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'role-permission-mgmt-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('489c8dd2-9a5d-43aa-b86d-5a84234d44e8', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'menu-edit-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('498861fe-3d21-48dd-ab71-fe5595999575', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'user-edit-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('4a74a3d6-d29d-40ff-8a00-953bd0ab85c6', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'admin-dashboard-export-logs-btn', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('4d1fd668-c78a-414c-acb4-8cd21fd3927c', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'log-management', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('4d5c1edb-df6d-49cf-b9a9-0511d0976b6a', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'menu-delete-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('4d9b9477-c784-4eac-9256-0d0d1d198175', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'user-batch-delete-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('4eb8ff96-6c6f-4079-9f78-b917810ddbd2', '1229689c-f005-4d61-888c-f25562d3802b', 'profile-change-password-btn', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('511b3697-ee12-45ee-8567-fd5cba25fa78', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'log-view-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('511bc5d2-3486-47c1-857a-de6b74183bd1', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'basic-info-job', '2026-01-12 16:58:30');
INSERT INTO `role_menus` VALUES ('5153243b-e568-4f62-b569-9dd9a13a2083', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'user-management', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('535be115-0160-4ce7-a637-595aad0d4d30', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'document-management', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('55caff9a-7be6-4232-90bf-24cec5e3262f', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'log-management', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('57e5655e-bb82-4e76-bb07-a074460de479', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'basic-info-basis', '2026-01-12 16:58:29');
INSERT INTO `role_menus` VALUES ('57f8bfe4-ed1e-4258-a929-94b9643968f3', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'admin-dashboard-user-mgmt-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('59d21775-38ec-4744-8aaa-61017cdc94f6', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'admin-dashboard-user-mgmt-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('5eed402a-0733-41ea-8351-4df30d632c1f', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'role-management', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('5effcb42-4beb-45a0-bc43-e51c5a45059a', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'admin-dashboard-create-app-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('61fd1ee5-91a4-476a-adc9-983e0d0f85c2', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'menu-create-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('639c41f2-5147-46c0-bfed-d65606ae827f', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'admin-dashboard-app-mgmt-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('63aba4e8-0754-4f9d-ba6b-a1ee1b628b08', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'permission-edit-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('668e0d7a-39a9-43c3-b60c-ce06ed6d77ef', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'permission-view-roles-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('672a3ae2-72ac-432d-b6ca-ce0169b0825a', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'app-view-logs-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('681f3ce7-302d-482e-8d84-b1e6e9454b7e', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'document-kb-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('682e2f40-74d6-40e8-a4f3-4e9a920f0fcc', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'menu-management', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('69419ca1-d2a0-4598-9131-0085d75ca22e', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'user-create-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('6b304d44-412f-4040-88c7-39640638fede', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'app-view-secret-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('6c0d6a43-a377-4047-9707-6618dbf91dbe', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'system-settings', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('6ce5de98-b3fa-4dff-b05b-188b82fc3ff8', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'document-view-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('6ef178a1-dd83-471a-a6e2-c69ffc71a48d', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'basic-info-work', '2026-01-12 16:58:29');
INSERT INTO `role_menus` VALUES ('71b7c085-91de-46ac-adac-bf494ebccd83', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'permission-edit-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('71cbd615-7a60-4101-8a1e-51506e70fd5b', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'role-permission-mgmt-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('721c2352-33f3-44be-acb9-9bffe5e1aeb6', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'user-assign-role-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('722b2daf-c009-46b0-952a-fa7c28a61bfb', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'app-create-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('72d27e8d-6733-4419-b609-2cefc5200dac', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'role-delete-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('741d46a1-f1b6-40bb-b537-053d785aa786', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'permission-management', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('748da9c8-00db-43de-ac2d-452ccdf96b63', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'profile-reset-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('75717fd9-24c9-4a13-b439-7abcf49b6733', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'admin-dashboard-create-user-btn', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('760c642b-8d94-4699-94e3-9ee9ff7312c8', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'app-view-secret-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('78b455c2-0941-4f64-a7a3-1e73c774063f', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'basic-info-main', '2026-01-12 16:58:30');
INSERT INTO `role_menus` VALUES ('7a4a5a36-992d-48b2-822b-e923c1f489ff', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'profile-save-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('7a58d281-a220-4e08-944b-689f1f6360fc', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'document-upload-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('7a7eaeb4-0b40-4987-9caf-2361809bea81', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'menu-delete-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('7b6c5afd-e436-4575-bec0-49bed2cfe9d5', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'user-reset-password-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('7ba3497a-670f-46bd-b4ee-1d1382c360f6', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'basic-info-work', '2026-01-12 16:58:30');
INSERT INTO `role_menus` VALUES ('7c7128a9-b745-46e1-adec-1802a29338a9', '1229689c-f005-4d61-888c-f25562d3802b', 'profile-main', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('7cbb649e-d4b5-40c9-810e-06415c0261c5', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'dashboard-main', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('8230300e-9e0e-4cf5-8878-f750c736102b', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'admin-dashboard-view-logs-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('877f8ec0-f5f2-40f1-9803-091f7457199b', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'log-clear-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('88583719-ac8a-4ed1-bb71-791f69abe6fb', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'dashboard-main', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('89d463b9-84ae-4f30-9bda-4647bfcec62f', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'permission-view-roles-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('89f9c92d-052e-4543-a56c-27beb334d9a1', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'app-edit-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('8b406992-5ccf-4827-8ac1-971f67432bd3', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'admin-dashboard-create-user-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('8b6bff2e-d10a-4841-b918-438e6694f4c2', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'admin-dashboard', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('8bbaa5b0-836c-451a-bc6c-4a4bc36549bb', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'admin-main', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('8c487823-f4d3-40f6-86a3-a5b8575389c8', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'app-management', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('8f4db010-62f2-4fab-999f-f5b5b54d1475', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'role-delete-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('8fdfa185-411e-40f9-a657-93a69be87b62', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'dashboard-main', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('91c07e2e-ca6f-464d-a986-af5221325632', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'settings-edit-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('9335db4c-22bb-4275-974b-17ab6fd4cd68', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'profile-reset-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('971bb28b-aed2-4f00-80f7-44c08c664b3d', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'role-delete-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('9a7d45cb-b0f5-4e98-98c6-327a8a79c5af', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'profile-save-btn', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('9c4af5c4-ce5b-4f10-8e8a-9272c0f58b5d', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'role-create-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('9d73c2fb-13de-4cd4-912a-517639b15e6d', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'admin-dashboard-create-app-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('9e3a0a94-e08e-4505-9ab2-7d429eccbdfd', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'user-delete-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('9f6f70e1-28db-47ee-926e-901cabf260b4', '1229689c-f005-4d61-888c-f25562d3802b', 'dashboard-main', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('a18144d3-724f-46e1-9462-f3c01595265f', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'role-permission-mgmt-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('a29535e9-25d1-4579-a71c-3561ada07bea', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'app-delete-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('a4008386-2a5f-4a81-831a-87a087f8fa7e', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'document-kb-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('a56a8c83-4920-4310-a166-4416c209d67d', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'document-management', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('a713b8fa-2eb5-46ea-a613-09eb1c9eda57', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'user-delete-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('a7851bd7-d090-4a4b-91a8-de3258ff32a7', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'permission-create-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('a7d93cbd-49bb-49f3-9b57-77c396c57bde', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'admin-main', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('a87760e1-6739-4cef-8de9-f01c4feb9fba', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'app-reset-secret-btn', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('aa7ed70f-5f89-4e9e-a5e0-a32737140e33', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'permission-delete-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('acbe4717-8f3d-48f7-b255-cbf9c0d2bc91', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'role-management', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('ae61f73a-743e-4917-8c1c-d9442c3ef93e', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'app-reset-secret-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('af01f222-1976-45c2-91bf-4e4aebf950e8', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'app-edit-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('b5143288-ef6f-44dc-be33-71d1e0b7bc2f', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'basic-info-basis', '2026-01-12 16:58:30');
INSERT INTO `role_menus` VALUES ('b57c63d8-5f08-4ef2-8658-8262153c6e13', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'admin-dashboard', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('b703abcd-127b-417b-91ee-6e9b9f0b76fb', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'profile-change-password-btn', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('b9927191-e621-43e0-b851-6de184c4abb9', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'log-view-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('c225a72f-c16a-4aa4-827e-f817510d9072', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'document-delete-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('c357de49-1e51-497e-a116-767ea4173b09', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'permission-create-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('c46a8891-02c7-4a9c-8dc4-7dd512fa6c12', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'admin-dashboard', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('c7188393-f1c0-11f0-b5f2-128f048cee51', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'document-edit-btn', '2026-01-15 11:17:52');
INSERT INTO `role_menus` VALUES ('c78a42cc-1349-4b1e-8d35-282834c02daa', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'user-edit-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('ca057328-d383-4a55-9a64-3ac4c99abe50', '1229689c-f005-4d61-888c-f25562d3802b', 'profile-save-btn', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('ca15d228-aad9-4309-aa2d-42a1ee8bc880', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'document-upload-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('ca498f8e-81e7-488b-9eec-fb9f0e2bd796', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'admin-dashboard-settings-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('cf6225aa-e719-471c-81ac-fe5a3ba89a8b', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'document-delete-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('cfc57f6d-f9ec-4582-b4d5-34391eb7a539', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'app-create-btn', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('d20ce931-7df4-4fa6-95f1-0f911be7352b', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'role-edit-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('d52e88b5-4939-4ccf-99bf-3bc13bbb223a', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'admin-dashboard-export-logs-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('d57985e4-f936-418b-a61b-0809e2c11983', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'app-create-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('d85dcc8f-af45-4510-92af-8646a9e2a411', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'app-view-logs-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('d9d4f246-d0f8-47dc-946c-d101ae9ab854', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'admin-dashboard-user-mgmt-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('db2f5f31-8eda-4a8b-8257-c55cae5bc55f', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'admin-dashboard-view-logs-btn', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('db46be82-3abe-422f-b16d-e6f2e28164ce', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'admin-dashboard-settings-btn', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('dc1831e3-7686-4465-b075-07eb58b2e666', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'role-management', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('dcc097d4-6952-4a4a-a840-5cd98e729cd2', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'menu-create-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('dcdc7d65-e4a6-4730-b791-712aef484b92', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'user-management', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('de4dd5e1-20c9-40d1-94c3-e497e2cf17cf', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'profile-save-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('e0b71480-5834-4548-86c3-32b071f087ca', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'app-delete-btn', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('e16ddb95-b768-4688-a269-aeb900c8e9fb', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'user-management', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('e3a53432-19b7-4502-b517-976eb1b33f43', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'profile-main', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('e5bf2916-1e7e-4298-93b2-6e696151394c', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'admin-dashboard-app-mgmt-btn', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('e6188b85-678c-4e63-a341-9251a682456f', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'profile-reset-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('e6ccf2f4-b706-431c-b5f1-763119f7c18a', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'basic-info-main', '2026-01-12 16:58:29');
INSERT INTO `role_menus` VALUES ('e7766924-e627-46e0-9156-699c5f972ed6', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'admin-dashboard-export-logs-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('e7b6703c-16b8-4788-ba53-5e4685eafa24', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'settings-view-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('e9ed56da-fa58-4ece-bc0e-a2fab0d7ffa5', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'user-batch-delete-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('eac50c61-4722-4bab-8bc3-13981314a50b', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'admin-dashboard-settings-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('eaebfc57-b63a-48eb-a416-a109d00f8fa6', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'profile-main', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('f14054bb-0100-46b5-b4a5-208c558c43e3', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'admin-dashboard-user-mgmt-btn', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('f49e32f0-4111-4492-b534-330650c9aa45', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'role-create-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('f5585512-ea3e-4a8d-a90b-929d9a143316', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'document-view-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('f65a8371-3347-4586-8702-ef566b3fa977', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'admin-dashboard', '2026-01-06 17:46:33');
INSERT INTO `role_menus` VALUES ('f6774852-de26-4a22-98e7-bbde8534197f', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'menu-management', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('f6bdff3b-d266-43cc-b4df-0346e7264f20', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'basic-info-job', '2026-01-12 16:58:29');
INSERT INTO `role_menus` VALUES ('f763aa2a-bdb1-4320-bd9b-2d1ecfc865d3', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'role-edit-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('f9ab6415-77b5-4595-a969-a365dcaf2137', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'log-clear-btn', '2026-01-06 17:46:34');
INSERT INTO `role_menus` VALUES ('fe20cf51-848e-4bbd-bfc3-892888c939c3', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'settings-view-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('feae5878-5e41-440f-9d3e-49d71313b4f1', '1229689c-f005-4d61-888c-f25562d3802b', 'profile-reset-btn', '2026-01-06 17:46:36');
INSERT INTO `role_menus` VALUES ('ff8f9446-6468-4713-b25e-6a7334ebe3bc', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'profile-save-btn', '2026-01-06 17:46:35');
INSERT INTO `role_menus` VALUES ('uuid()', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'fa322e98-3bde-4158-a60e-3e4bc44e1554', '2026-01-09 14:52:25');

-- ----------------------------
-- Table structure for role_permissions
-- ----------------------------
DROP TABLE IF EXISTS `role_permissions`;
CREATE TABLE `role_permissions`  (
  `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'uuid()',
  `role_id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `permission_id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `created_at` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uk_role_permission`(`role_id`, `permission_id`) USING BTREE,
  INDEX `idx_role_id`(`role_id`) USING BTREE,
  INDEX `idx_permission_id`(`permission_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '角色权限关联表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of role_permissions
-- ----------------------------
INSERT INTO `role_permissions` VALUES ('01fa96cd-298f-4855-a4ef-16915596dc3e', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'cb92754f-3e32-4a69-aaf2-23f20a4a589f', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('0261a1bc-52f6-42b3-b76d-ed24feff036b', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', '38ee71e8-0c67-4f76-ac4a-b6a94a101ba4', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('03765128-29f8-438d-bcfb-b7715cf110e7', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'f931de1a-e374-4cbd-8506-1aa4273bf657', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('04f7369e-f7aa-4abf-a8ba-9d663edd993e', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', '416647f6-4a64-471c-a42e-1b4fdf2c8a56', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('061d10ca-8c04-4bbd-8c09-ea467e35fbba', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', '3f70df3e-f26a-41b7-b0f6-5c50aa43c8b7', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('0afb80f1-49c5-4182-8cf8-ac5283a2f6e5', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'b5ed5637-bb00-4a89-b685-7c63f9305e26', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('0cf4b3e0-77ad-42bf-aee2-3e375ad647cc', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '09a31c8e-b298-4fd8-8b38-58a480428f18', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('129d6e29-a485-4ff9-801e-1212698f6e0d', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '822ab59c-e4a7-4eb9-b789-848378678710', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('13d6b857-a6b1-4ead-a452-dcbfa204d05d', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '3bae0593-c9a6-4abd-8cc8-ce396e9fdbd0', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('19d0e72b-308e-4473-bc80-c179fde0c524', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'c6ea84d4-1429-43ea-aad2-0a0f81156849', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('1ad46bf8-626e-42bf-8c26-657ed6a7f0e3', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '09a31c8e-b298-4fd8-8b38-58a480428f18', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('1bca7d5b-8140-4815-af86-cc7c1d8bcb41', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'a54a9829-5fb3-44b4-b658-9b4cb30d7d84', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('1f6b6a61-b3ce-4dee-8460-9f9e04c788fd', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'c6ea84d4-1429-43ea-aad2-0a0f81156849', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('21337346-c8ee-4b44-949f-fc4ed37fcb1a', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'bc51f030-3efe-4544-9a5e-ff42a18318fb', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('219d30b7-1948-45e8-aba7-4dfb6fdaca34', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '3ff3cc15-a911-4616-a4ce-51e29c477521', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('22842f78-f6e5-42a3-8aec-33ad13314540', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'ad24cece-a009-4b22-a4ef-9a4ae0bee265', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('233b5e88-7f56-4f1c-9d1a-cd5046219d06', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'f5b95bba-4d34-4cbd-bb2a-8f3f548b7a89', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('268aca56-aeea-4e66-af08-f961af9b6301', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '3ff3cc15-a911-4616-a4ce-51e29c477521', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('27eb58e2-2af6-43bb-bcf9-54c2a2be0795', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'f5b95bba-4d34-4cbd-bb2a-8f3f548b7a89', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('289cee46-38ed-4884-a419-0f5aefc21dde', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'eebab12f-135a-4b19-85a9-bfd567fd843c', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('28ffc747-ca89-4251-9b53-4e2b640cdc4f', '1229689c-f005-4d61-888c-f25562d3802b', 'a9773815-23d6-4594-85f4-1610bca98ce5', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('29a1a1c5-fbd0-41c2-bee0-ba64e9ce81d0', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '38ee71e8-0c67-4f76-ac4a-b6a94a101ba4', '2026-01-06 17:46:31');
INSERT INTO `role_permissions` VALUES ('2e74073f-b2d9-4822-8cd0-a98c6002f080', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '82937e5c-5d37-44fe-84fa-87af20f94a1c', '2026-01-06 17:46:31');
INSERT INTO `role_permissions` VALUES ('33ee5f48-b34f-405e-8fc3-eba702bcf69c', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '35dcf1ea-2eeb-4316-bf18-9b92c087a2d7', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('373063b4-bc6c-45d7-a608-70143f376428', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '0f31a263-a067-409a-ad05-641a45e6ed10', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('39dd10ba-c883-41b8-8711-ce25b0712cd7', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '9786516e-1908-4fae-801e-c60c9c35b86c', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('3ce6c277-4be0-4adf-be4a-8777e048bdbb', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'bc51f030-3efe-4544-9a5e-ff42a18318fb', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('3d0db9b5-0d4e-4d1c-8a69-b439b285ae67', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', '638e2445-878c-40f7-83be-597972d15cf0', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('3da72a51-fffc-433f-9c38-b3420efc2dad', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', '35dcf1ea-2eeb-4316-bf18-9b92c087a2d7', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('3f9a5e61-97ae-46c1-91ab-2c9d974936d3', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'cee81ef4-d9ea-40eb-bce6-bb9499b21771', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('40d4db2c-19c4-48d5-a015-4ff1f8958cfd', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'bc51f030-3efe-4544-9a5e-ff42a18318fb', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('4223d16b-88f7-42f6-9523-e67a9e30abcb', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '347cef5d-20c0-46b5-ac9e-489a8049ab20', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('44956fae-c40d-4551-84c5-c8baa914b6a9', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'cb92754f-3e32-4a69-aaf2-23f20a4a589f', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('45457253-ac54-4bd3-8c8a-224dd9a6ecbf', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', '66430840-9192-4906-8665-ccffd3075bd9', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('46d256f0-891b-4055-a951-3ef60dafc468', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'ad24cece-a009-4b22-a4ef-9a4ae0bee265', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('48811349-1eeb-4425-893b-8df01ab600a0', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '638e2445-878c-40f7-83be-597972d15cf0', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('4fef4ad4-edc8-4398-b47e-2fd7b371eed3', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '0b06cfe7-8dd5-4596-8b70-1aae1fee67f9', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('50f28ef0-7c60-4d28-b7b7-1f3bbdd30d00', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'f931de1a-e374-4cbd-8506-1aa4273bf657', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('51ca95ac-5752-4446-a292-4a281aab3d6f', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '35dcf1ea-2eeb-4316-bf18-9b92c087a2d7', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('52ff24f7-7dd0-484d-aa19-bd0fc9cccdd5', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', '218d77b3-123e-4437-a976-be69e27474a8', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('54302758-bc4f-44bf-bd6c-7432b2d6082b', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'e318b904-a302-4ff3-832e-9e40940029b7', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('5468f76b-17ec-4a0e-8e7a-75dffbd6d33a', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '5cae8f32-f13d-4c2b-a969-cd9de503e9eb', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('54b07e41-b4c3-4300-a75b-76314c703705', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'd4eb97ca-a2fc-4f69-a264-90f22261da72', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('5631182a-1959-4621-b1d4-c6acfdcbbe9b', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'a7e2ceaf-4330-44ba-bf9c-30e09c88e961', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('56ffee4c-15e0-484f-84bb-ad3b2a480205', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '66430840-9192-4906-8665-ccffd3075bd9', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('578a00e9-9a99-47ca-b011-36dcac16d470', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'f5b95bba-4d34-4cbd-bb2a-8f3f548b7a89', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('5b431549-218c-4175-97bd-931071e76f95', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '66430840-9192-4906-8665-ccffd3075bd9', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('5b984473-7815-4aa3-9ed3-2ec560790ecf', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'a7e2ceaf-4330-44ba-bf9c-30e09c88e961', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('5f378f62-1f66-4192-9ae0-6b92f2990381', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'a9773815-23d6-4594-85f4-1610bca98ce5', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('60f0fefc-68f1-4df5-8b54-e5fe97c7d4c0', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '3f70df3e-f26a-41b7-b0f6-5c50aa43c8b7', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('63609b51-8ebd-4571-9544-e9b656eba423', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '9786516e-1908-4fae-801e-c60c9c35b86c', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('66906fd8-d783-48a0-97c1-c5066fd0e68e', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'c6ea84d4-1429-43ea-aad2-0a0f81156849', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('68536fe8-9be0-4abf-b03f-c6cf61eda01a', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '17264c50-89d4-4ac5-8072-8196324fc561', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('6aad6c7e-b1f2-4199-a286-c53ad52999dd', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'e318b904-a302-4ff3-832e-9e40940029b7', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('6b1f7cf8-37f1-4253-9d17-1d8ed1d6a95b', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '8149c1b2-8b73-482e-8214-5e06bc25623b', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('6e774e4e-b89e-455f-91d0-79788215a4f0', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'a54a9829-5fb3-44b4-b658-9b4cb30d7d84', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('6e9c22f7-a631-450a-a450-d8e8d6635f8b', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'd4eb97ca-a2fc-4f69-a264-90f22261da72', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('70f32c46-9b5f-4ccd-a33f-1035279e487d', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'e318b904-a302-4ff3-832e-9e40940029b7', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('73057066-ac54-4fff-b9ad-22d0bdfef04e', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'e0fe38a3-e905-440c-a90b-00b70a0894bb', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('73257350-4b0e-427c-bfad-c93327a8346c', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'c0f51e32-db23-49fa-8845-1faf6bf9c456', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('74d3963e-835c-420b-95e4-779cb15bf1ca', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '5630a397-94fb-4f52-9d3c-b496abc0487b', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('75417fc4-3f67-4fc0-b372-86d7eda943db', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', '5cae8f32-f13d-4c2b-a969-cd9de503e9eb', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('7654c6b8-ee5d-475d-b940-73fd18a683b8', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'baca63fe-0e1a-400e-a00a-6b1849b2d694', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('7919c8a8-e7b8-4b0f-a03d-ec46dfcc2f9f', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '5f653d91-e0fe-4650-bda7-1abff5a9d69b', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('7aa5a781-0ea7-4684-a5ae-6f862e1c7174', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '926408fe-3ee5-4a41-a524-f3138a235298', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('7dce1c85-5957-46e5-bbe2-bbbe5625eb4e', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '76b46489-6eba-4f76-841c-c088c38e3b1b', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('7f186d99-b2af-4e8b-bb2e-2778d240f905', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'a9773815-23d6-4594-85f4-1610bca98ce5', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('82e4748f-7c9a-4b18-b58b-f8afded577c8', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '347cef5d-20c0-46b5-ac9e-489a8049ab20', '2026-01-06 17:46:31');
INSERT INTO `role_permissions` VALUES ('834e39b2-41a5-498d-94b2-2de0ae6a8463', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', '59bcc91d-d331-4aff-9390-511821bb326f', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('8ae0815b-a419-44f0-b0c1-fc237d43af3a', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '114692ea-89d9-481f-8aef-1df56666b166', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('8b839151-b5b0-43e3-9664-6290d9710658', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'b5ed5637-bb00-4a89-b685-7c63f9305e26', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('8de3a8ce-185c-49f6-ba17-b01e2efa7f13', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'cb92754f-3e32-4a69-aaf2-23f20a4a589f', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('8f99f820-2835-4f23-a849-caa3fc80f97c', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'b43439e6-de46-4b5e-bc78-f23271fbb5b0', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('8fa7c4a7-f604-4a64-8354-71028282cfe5', '1229689c-f005-4d61-888c-f25562d3802b', '416647f6-4a64-471c-a42e-1b4fdf2c8a56', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('911d75d2-8ea4-4474-985c-593d6464815a', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'ba38077d-d8f6-44ce-a70b-be5b693787b5', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('938a633e-757d-414e-8525-10094434f894', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '3bae0593-c9a6-4abd-8cc8-ce396e9fdbd0', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('99081c5e-cc51-4507-87a3-bb0748f3c148', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '37f3e685-f249-4702-a83f-263e8eb2f657', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('9ae0a4ec-678e-48e0-93c6-42bf94814f14', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '416647f6-4a64-471c-a42e-1b4fdf2c8a56', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('9b65c87d-d491-4962-b585-0bd9d8b62bee', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '82937e5c-5d37-44fe-84fa-87af20f94a1c', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('9b8eebaf-ea7b-4061-b9ee-20d2ca27b070', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '416647f6-4a64-471c-a42e-1b4fdf2c8a56', '2026-01-06 17:46:31');
INSERT INTO `role_permissions` VALUES ('9de846ed-875b-4bff-b369-5631eb1a6f50', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'a7e2ceaf-4330-44ba-bf9c-30e09c88e961', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('a31ba6a6-abbb-4c51-866b-9cb1e915695a', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '37f3e685-f249-4702-a83f-263e8eb2f657', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('a5d21020-654f-4348-8e4e-bf8dfb723470', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '24406901-5022-4f96-8afa-8e91c6b6bcbd', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('a6b14cae-64f7-4593-8383-992b75045a28', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'f931de1a-e374-4cbd-8506-1aa4273bf657', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('a7fdd935-28e4-4c15-b20e-fae2a84b7ecf', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '44b36fb7-c844-4b2f-9d48-e80b426536b9', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('ac8c02c1-ee55-4352-a2ef-974ff38947cb', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '5630a397-94fb-4f52-9d3c-b496abc0487b', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('ad311738-5343-4676-b0d7-785490736701', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '638e2445-878c-40f7-83be-597972d15cf0', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('afce3106-99d8-406b-ad86-25a716bf465a', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '218d77b3-123e-4437-a976-be69e27474a8', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('b1079aa7-8a84-4750-b6f9-9b11050e12e7', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '76b46489-6eba-4f76-841c-c088c38e3b1b', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('b6faed7e-7110-4cbc-8f1c-004ed7ecc1d4', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', '44b36fb7-c844-4b2f-9d48-e80b426536b9', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('b7af13e3-0537-4dbd-b040-5d11a41711dd', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '59bcc91d-d331-4aff-9390-511821bb326f', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('bbf6d0a5-12c7-41c8-b7dc-3b4b485cc557', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '926408fe-3ee5-4a41-a524-f3138a235298', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('bc0b1d16-415c-45ad-9ee2-20dfd2a87c03', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '822ab59c-e4a7-4eb9-b789-848378678710', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('bce77a4b-6cc8-45bb-9e68-4e7d89be1d6c', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'e14cf02e-bacd-403b-914b-1af071bdccf4', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('bd9972bf-8922-4df8-b616-b27709b67b4b', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', '76b46489-6eba-4f76-841c-c088c38e3b1b', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('beffccdf-75ba-476d-8c49-59c8ed1186de', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'e0fe38a3-e905-440c-a90b-00b70a0894bb', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('c1f16695-4e33-4231-afa9-2a066baee3cf', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '38ee71e8-0c67-4f76-ac4a-b6a94a101ba4', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('c2be24d6-d9b8-44b4-bc8e-c8915c0a24e8', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '59bcc91d-d331-4aff-9390-511821bb326f', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('c2f3ba27-2227-418f-94f1-6eab7a301a69', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '24406901-5022-4f96-8afa-8e91c6b6bcbd', '2026-01-06 17:46:31');
INSERT INTO `role_permissions` VALUES ('cab20863-5a7f-42b6-84b1-8ae37ba11a35', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '5f653d91-e0fe-4650-bda7-1abff5a9d69b', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('cb7715f6-5112-4af3-bbf5-613ff3ad19d5', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'b43439e6-de46-4b5e-bc78-f23271fbb5b0', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('d2250c05-614c-4707-ab55-eaf95ecec816', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'f945e7b4-8ba6-4ba7-98f9-91ef96ffb267', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('d934f22f-04bc-4f51-8c53-510f71e5547d', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '114692ea-89d9-481f-8aef-1df56666b166', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('db4feb46-accc-4cae-801f-cd75b0991653', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', '416647f6-4a64-471c-a42e-1b4fdf2c8a56', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('db974c92-8c17-471c-ae78-719cdbebb794', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', '5cae8f32-f13d-4c2b-a969-cd9de503e9eb', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('df1e63cd-4ab7-4762-8d98-34b528aa381e', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '3f70df3e-f26a-41b7-b0f6-5c50aa43c8b7', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('e0d30814-ed8f-4536-a3e3-f6800977711c', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'b43439e6-de46-4b5e-bc78-f23271fbb5b0', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('e10b63f5-2f2c-4499-bb83-8d76177862f8', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '5cae8f32-f13d-4c2b-a969-cd9de503e9eb', '2026-01-06 17:46:31');
INSERT INTO `role_permissions` VALUES ('e1f7529a-98ef-43cb-beee-5b64f0b66780', '6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', '0b06cfe7-8dd5-4596-8b70-1aae1fee67f9', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('e406bcef-9214-43d8-8521-2b4e940a1001', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'e14cf02e-bacd-403b-914b-1af071bdccf4', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('e646517e-fc1e-4d04-8c4e-60063b8d8e69', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'baca63fe-0e1a-400e-a00a-6b1849b2d694', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('e78eacc3-5dad-44d6-b5d8-54a62a52484e', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '0b06cfe7-8dd5-4596-8b70-1aae1fee67f9', '2026-01-06 17:46:31');
INSERT INTO `role_permissions` VALUES ('e9f5736c-42b7-4b93-8956-9681316f494a', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '218d77b3-123e-4437-a976-be69e27474a8', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('eb208f28-55a4-4953-b6f2-65cb9e6e7b25', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '8149c1b2-8b73-482e-8214-5e06bc25623b', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('ec0e0283-b95c-4649-ac3e-f6e95df9efc9', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'ba38077d-d8f6-44ce-a70b-be5b693787b5', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('ecb6f940-c83c-487f-ae2a-dc9e42f7ff0e', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'f945e7b4-8ba6-4ba7-98f9-91ef96ffb267', '2026-01-06 17:46:31');
INSERT INTO `role_permissions` VALUES ('ed0eac95-7911-48dc-99e3-74705f915e07', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', '0b06cfe7-8dd5-4596-8b70-1aae1fee67f9', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('edbb2548-9380-4858-8d17-3cfb30b9b0ea', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'eebab12f-135a-4b19-85a9-bfd567fd843c', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('efc04bd4-cabc-4367-8781-493b335d0497', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'd4eb97ca-a2fc-4f69-a264-90f22261da72', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('efc27850-450a-4f05-933a-541204f00487', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', '347cef5d-20c0-46b5-ac9e-489a8049ab20', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('f0b04b52-f8ca-4112-bb8a-b85100169903', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', '17264c50-89d4-4ac5-8072-8196324fc561', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('f0d7ef5d-2447-48e0-a77c-933b03cc927d', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'a9773815-23d6-4594-85f4-1610bca98ce5', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('f1c85054-812b-4b93-b116-304a10aba908', 'd3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', '822ab59c-e4a7-4eb9-b789-848378678710', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('f4668cca-335c-475d-9693-2a669d1c09c1', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'ad24cece-a009-4b22-a4ef-9a4ae0bee265', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('f6c13a1a-96d8-42e8-be72-851a2f14bf0e', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', 'a9773815-23d6-4594-85f4-1610bca98ce5', '2026-01-06 17:46:31');
INSERT INTO `role_permissions` VALUES ('f9bfb39f-1752-4d20-962c-b006671a8002', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'c0f51e32-db23-49fa-8845-1faf6bf9c456', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('f9eca636-2760-4273-b238-5db08b8d7d1b', '1229689c-f005-4d61-888c-f25562d3802b', '0b06cfe7-8dd5-4596-8b70-1aae1fee67f9', '2026-01-06 17:46:33');
INSERT INTO `role_permissions` VALUES ('fe4b16fc-e171-4b60-9fcc-2acff23b7474', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '0f31a263-a067-409a-ad05-641a45e6ed10', '2026-01-06 17:46:32');
INSERT INTO `role_permissions` VALUES ('fe89dfd5-55c1-4c6c-b091-48b1482e47b7', '1f7a5bdc-f567-4afc-af38-6f00b2036e23', '44b36fb7-c844-4b2f-9d48-e80b426536b9', '2026-01-06 17:46:33');

-- ----------------------------
-- Table structure for roles
-- ----------------------------
DROP TABLE IF EXISTS `roles`;
CREATE TABLE `roles`  (
  `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'uuid()',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '角色名称',
  `display_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '角色显示名称',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '角色描述',
  `is_active` tinyint(1) NULL DEFAULT 1 COMMENT '是否启用',
  `is_system` tinyint(1) NULL DEFAULT 0 COMMENT '是否系统角色',
  `created_at` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
  `updated_at` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0),
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `name`(`name`) USING BTREE,
  INDEX `idx_name`(`name`) USING BTREE,
  INDEX `idx_is_active`(`is_active`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '角色表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of roles
-- ----------------------------
INSERT INTO `roles` VALUES ('1229689c-f005-4d61-888c-f25562d3802b', 'user', '普通用户', '系统普通用户', 1, 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `roles` VALUES ('1f7a5bdc-f567-4afc-af38-6f00b2036e23', 'admin', '管理员', '系统管理员，拥有大部分管理权限', 1, 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `roles` VALUES ('6d4fe371-f299-412c-a1e2-bf5bb3bdf6bd', 'app_manager', '应用管理员', '负责应用管理的管理员', 1, 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `roles` VALUES ('a0e52467-6f4b-47c2-8300-05e0df05b14d', 'super_admin', '超级管理员', '拥有系统所有权限的超级管理员', 1, 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');
INSERT INTO `roles` VALUES ('d3b1fc02-26b9-4f99-ab1c-821ac2cd43dc', 'user_manager', '用户管理员', '负责用户和角色管理的管理员', 1, 1, '2026-01-06 17:46:31', '2026-01-06 17:46:31');

-- ----------------------------
-- Table structure for sync_logs
-- ----------------------------
DROP TABLE IF EXISTS `sync_logs`;
CREATE TABLE `sync_logs`  (
  `app_id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '应用ID',
  `sync_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '同步类型',
  `sync_status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '同步状态',
  `records_count` int(0) NULL DEFAULT NULL COMMENT '记录数量',
  `success_count` int(0) NULL DEFAULT NULL COMMENT '成功数量',
  `failure_count` int(0) NULL DEFAULT NULL COMMENT '失败数量',
  `error_message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL COMMENT '错误信息',
  `start_time` datetime(0) NULL DEFAULT NULL COMMENT '开始时间',
  `end_time` datetime(0) NULL DEFAULT NULL COMMENT '结束时间',
  `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '主键ID',
  `created_at` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  `updated_at` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
  `is_deleted` tinyint(1) NULL DEFAULT NULL COMMENT '是否删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `app_id`(`app_id`) USING BTREE,
  CONSTRAINT `sync_logs_ibfk_1` FOREIGN KEY (`app_id`) REFERENCES `apps` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sync_logs
-- ----------------------------

-- ----------------------------
-- Table structure for t_basis_of_preparation
-- ----------------------------
DROP TABLE IF EXISTS `t_basis_of_preparation`;
CREATE TABLE `t_basis_of_preparation`  (
  `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `chinese_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '中文名称',
  `english_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '英文名称',
  `standard_number` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '标准编号，如：xxx 3223—2021',
  `issuing_authority` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发布单位',
  `release_date` date NULL DEFAULT NULL COMMENT '发布日期',
  `implementation_date` date NULL DEFAULT NULL COMMENT '实施日期',
  `drafting_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '主编单位',
  `approving_department` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批准部门',
  `participating_units_1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '参编单位_1，可多条，建议用JSON数组或拆分多个字段；此处为第一个参编单位',
  `participating_units_2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '参编单位_2，第二个参编单位',
  `participating_units_3` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '参编单位_3，第三个参编单位',
  `participating_units_4` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '参编单位_4，第四个参编单位',
  `document_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '文件类型，枚举：法律法规、国家标准、行业标准、企业标准、规范性文件、技术规范',
  `professional_field` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '专业领域，枚举：法律、参考规范、行政法规、部门规章',
  `engineering_phase` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '工程阶段，待补充具体枚举值，如：规划、设计、施工、运维等',
  `validity` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '时效性，枚举：现行、已废止、被替代',
  `reference_basis_1` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '参考依据_1',
  `reference_basis_2` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '参考依据_2',
  `source_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '文件来源网址，如：http://www.xxx.com/xxx/xxx/xxx.pdf',
  `file_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '文件ID（OSS上传后），OSS对象存储唯一标识，如：oss://bucket-name/path/to/file.pdf',
  `created_by` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
  `created_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间，默认当前时间',
  `updated_by` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '修改人',
  `updated_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间，默认当前时间',
  `file_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '编制依据' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_basis_of_preparation
-- ----------------------------
INSERT INTO `t_basis_of_preparation` VALUES ('3a2a4d64-a962-4319-a84b-f89a739a355f', '新建 文本文档', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'admin', '2026-01-15 09:49:36', NULL, '2026-01-15 09:49:36', NULL, NULL);
INSERT INTO `t_basis_of_preparation` VALUES ('52e01c43-16a8-4005-9f61-936488130379', '建筑', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'admin', '2026-01-15 09:35:39', NULL, '2026-01-15 09:35:39', NULL, NULL);

-- ----------------------------
-- Table structure for t_samp_document_main
-- ----------------------------
DROP TABLE IF EXISTS `t_samp_document_main`;
CREATE TABLE `t_samp_document_main`  (
  `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '主键',
  `source_type` enum('basis','work','job') CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '所属类型',
  `source_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '所属ID',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '文档名称',
  `conversion_status` int(0) NOT NULL DEFAULT 0 COMMENT '状态: 0-待转换, 1-转换中, 2-完成, 3-失败',
  `whether_to_enter` int(0) NOT NULL DEFAULT 0 COMMENT '是否入库: 0-未入库, 1-已入库',
  `conversion_error` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '错误原因详情',
  `file_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '文件URL',
  `md_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Markdown文件URL',
  `json_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'JSON文件URL',
  `file_extension` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '后缀名',
  `created_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '创建人',
  `created_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
  `updated_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '修改人',
  `updated_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `idx_source_id_type`(`source_id`, `source_type`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '文档记录表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_samp_document_main
-- ----------------------------

-- ----------------------------
-- Table structure for t_job_of_preparation
-- ----------------------------
DROP TABLE IF EXISTS `t_job_of_preparation`;
CREATE TABLE `t_job_of_preparation`  (
  `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `file_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '文件名称',
  `issuing_department` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发布部门',
  `document_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '文件类型，枚举：采购、报销、审批等',
  `publish_date` date NULL DEFAULT NULL COMMENT '发布日期',
  `effective_start_date` date NULL DEFAULT NULL COMMENT '时效开始日期',
  `effective_end_date` date NULL DEFAULT NULL COMMENT '时效结束日期，若为长期有效，可设为 NULL 或 9999-12-31',
  `created_by` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
  `created_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间，默认 CURRENT_TIMESTAMP',
  `updated_by` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '修改人',
  `updated_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间，默认 CURRENT_TIMESTAMP，更新时自动刷新',
  `file_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '办公制度' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_job_of_preparation
-- ----------------------------
INSERT INTO `t_job_of_preparation` VALUES ('351b063f-eb20-4cbd-abf6-7a1097adbebf', '办公', NULL, NULL, NULL, NULL, NULL, 'admin', '2026-01-15 09:48:00', NULL, '2026-01-15 09:48:00', NULL, NULL);

-- ----------------------------
-- Table structure for t_work_of_preparation
-- ----------------------------
DROP TABLE IF EXISTS `t_work_of_preparation`;
CREATE TABLE `t_work_of_preparation`  (
  `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `plan_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '方案名称',
  `project_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '工程名称',
  `project_section` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '工程标段',
  `compiling_unit` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '编制单位',
  `compiling_date` date NULL DEFAULT NULL COMMENT '编制日期',
  `plan_summary` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '方案概述',
  `compilation_basis_1` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '编制依据_1',
  `compilation_basis_2` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '编制依据_2',
  `compilation_basis_3` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '编制依据_3',
  `compilation_basis_4` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '编制依据_4',
  `compilation_basis_5` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '编制依据_5',
  `compilation_basis_6` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '编制依据_6',
  `compilation_basis_7` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '编制依据_7',
  `compilation_basis_8` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '编制依据_8',
  `compilation_basis_9` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '编制依据_9',
  `created_by` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
  `created_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间，默认 CURRENT_TIMESTAMP',
  `updated_by` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '修改人',
  `updated_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间，默认 CURRENT_TIMESTAMP，更新时自动刷新',
  `file_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '施工方案\r\n' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_work_of_preparation
-- ----------------------------
INSERT INTO `t_work_of_preparation` VALUES ('d4ef7acf-c28c-45cb-9214-0ddce85cf575', '方案', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'admin', '2026-01-15 09:47:47', NULL, '2026-01-15 09:47:47', NULL, NULL);

-- ----------------------------
-- Table structure for test_tab
-- ----------------------------
DROP TABLE IF EXISTS `test_tab`;
CREATE TABLE `test_tab`  (
  `id` int(0) NOT NULL AUTO_INCREMENT COMMENT '用户唯一标识符',
  `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '用户姓名',
  `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '用户邮箱，唯一',
  `age` int(0) NULL DEFAULT NULL COMMENT '用户年龄',
  `status` enum('active','inactive') CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT 'active' COMMENT '用户状态：active-活跃, inactive-非活跃',
  `created_at` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录创建时间',
  `updated_at` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '记录最后更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_email`(`email`) USING BTREE COMMENT '邮箱索引，用于快速查找',
  INDEX `idx_status`(`status`) USING BTREE COMMENT '状态索引，用于按状态筛选'
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '用户信息表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of test_tab
-- ----------------------------
INSERT INTO `test_tab` VALUES (1, '李四', 'test_email——upt', 22, 'active', '2025-11-14 11:40:00', '2025-11-14 13:24:11');
INSERT INTO `test_tab` VALUES (2, 'test_name', 'test_email', 18, 'active', '2025-11-14 11:40:39', '2025-11-14 11:40:39');
INSERT INTO `test_tab` VALUES (3, '执行任务', '10001', 18, 'active', '2025-11-14 11:42:24', '2025-11-14 11:42:24');
INSERT INTO `test_tab` VALUES (4, '张三', '10002', 18, 'active', '2025-11-14 12:56:07', '2025-11-14 12:56:07');

-- ----------------------------
-- Table structure for token_blacklist
-- ----------------------------
DROP TABLE IF EXISTS `token_blacklist`;
CREATE TABLE `token_blacklist`  (
  `token` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '令牌',
  `token_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '令牌类型',
  `expires_at` datetime(0) NOT NULL COMMENT '过期时间',
  `added_at` datetime(0) NULL DEFAULT NULL COMMENT '加入时间',
  `reason` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '加入原因',
  `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '主键ID',
  `created_at` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  `updated_at` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
  `is_deleted` tinyint(1) NULL DEFAULT NULL COMMENT '是否删除',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `token`(`token`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of token_blacklist
-- ----------------------------

-- ----------------------------
-- Table structure for user_profiles
-- ----------------------------
DROP TABLE IF EXISTS `user_profiles`;
CREATE TABLE `user_profiles`  (
  `user_id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '用户ID',
  `real_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '真实姓名',
  `gender` tinyint(0) NULL DEFAULT NULL COMMENT '性别 0:未知 1:男 2:女',
  `birth_date` date NULL DEFAULT NULL COMMENT '出生日期',
  `address` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '地址',
  `company` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '公司',
  `department` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '部门',
  `position` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '职位',
  `extra_info` json NULL COMMENT '扩展信息',
  `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '主键ID',
  `created_at` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  `updated_at` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
  `is_deleted` tinyint(1) NULL DEFAULT NULL COMMENT '是否删除',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_id`(`user_id`) USING BTREE,
  CONSTRAINT `user_profiles_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of user_profiles
-- ----------------------------
INSERT INTO `user_profiles` VALUES ('afa20a1c-ea0a-4f65-9928-d2faf9eae6ef', '测试', NULL, NULL, NULL, '测试', '测试', NULL, NULL, '0997e737-8a5d-44ef-91f4-b32595273d3a', '2025-12-27 13:49:12', '2025-12-29 21:57:39', NULL);
INSERT INTO `user_profiles` VALUES ('357f8ac2-a271-440a-a003-0db32d15d302', 'app', NULL, NULL, NULL, 'app', 'app', NULL, NULL, '12fe4ace-edfe-4d1f-a1f7-6613630a43dd', '2025-12-29 21:29:16', '2025-12-29 22:17:18', NULL);
INSERT INTO `user_profiles` VALUES ('d3e906de-b9a6-4a78-a643-233252252776', '张三', NULL, NULL, NULL, 'test', 'test', NULL, NULL, '67b6be23-d2a1-43d5-80e8-81e98736cdaa', '2025-12-28 21:45:15', '2025-12-28 21:45:15', NULL);
INSERT INTO `user_profiles` VALUES ('3d0efc90-7c0c-42ca-8426-82bad3fdd0c7', 'admin', NULL, NULL, NULL, 'admin', 'admin', NULL, NULL, 'a116ecd5-249d-40d6-af0d-466cedf71a30', '2025-12-29 21:35:23', '2025-12-29 21:36:08', NULL);

-- ----------------------------
-- Table structure for user_roles
-- ----------------------------
DROP TABLE IF EXISTS `user_roles`;
CREATE TABLE `user_roles`  (
  `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT 'uuid()',
  `user_id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `role_id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `assigned_by` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '分配者ID',
  `assigned_at` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
  `expires_at` timestamp(0) NULL DEFAULT NULL COMMENT '过期时间',
  `is_active` tinyint(1) NULL DEFAULT 1 COMMENT '是否启用',
  `created_at` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
  `updated_at` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0),
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uk_user_role`(`user_id`, `role_id`) USING BTREE,
  INDEX `idx_user_id`(`user_id`) USING BTREE,
  INDEX `idx_role_id`(`role_id`) USING BTREE,
  INDEX `idx_expires_at`(`expires_at`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户角色关联表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of user_roles
-- ----------------------------
INSERT INTO `user_roles` VALUES ('37ddfd50-3c3f-40a9-828e-6769552fcc09', '357f8ac2-a271-440a-a003-0db32d15d302', '1229689c-f005-4d61-888c-f25562d3802b', NULL, '2026-01-06 17:46:36', NULL, 1, '2026-01-06 17:46:36', '2026-01-06 17:46:36');
INSERT INTO `user_roles` VALUES ('6c8de28e-e007-44af-a882-94d16d351246', 'd3e906de-b9a6-4a78-a643-233252252776', '1229689c-f005-4d61-888c-f25562d3802b', NULL, '2026-01-06 17:46:36', NULL, 1, '2026-01-06 17:46:36', '2026-01-06 17:46:36');
INSERT INTO `user_roles` VALUES ('99435ee7-b045-4edb-b075-e631aa06b76b', 'ed6a79d3-0083-4d81-8b48-fc522f686f74', 'a0e52467-6f4b-47c2-8300-05e0df05b14d', NULL, '2026-01-06 17:46:36', NULL, 1, '2026-01-06 17:46:36', '2026-01-06 17:46:36');
INSERT INTO `user_roles` VALUES ('e1b44592-39f3-4994-8405-0c0ddffa7833', '3d0efc90-7c0c-42ca-8426-82bad3fdd0c7', '1229689c-f005-4d61-888c-f25562d3802b', NULL, '2026-01-06 17:46:36', NULL, 1, '2026-01-06 17:46:36', '2026-01-06 17:46:36');
INSERT INTO `user_roles` VALUES ('ffdf623e-9e8b-421f-8674-dd07a0f32fa9', 'afa20a1c-ea0a-4f65-9928-d2faf9eae6ef', '1229689c-f005-4d61-888c-f25562d3802b', NULL, '2026-01-06 17:46:36', NULL, 1, '2026-01-06 17:46:36', '2026-01-06 17:46:36');

-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users`  (
  `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '用户名',
  `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '邮箱',
  `phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '手机号',
  `password_hash` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '密码哈希',
  `avatar_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '头像URL',
  `is_active` tinyint(1) NULL DEFAULT NULL COMMENT '是否激活',
  `is_superuser` tinyint(1) NULL DEFAULT NULL COMMENT '是否超级管理员',
  `last_login_at` datetime(0) NULL DEFAULT NULL COMMENT '最后登录时间',
  `last_login_ip` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '最后登录IP',
  `failed_login_attempts` int(0) NULL DEFAULT NULL COMMENT '失败登录次数',
  `locked_until` datetime(0) NULL DEFAULT NULL COMMENT '锁定直到时间',
  `id` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '主键ID',
  `created_at` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  `updated_at` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
  `is_deleted` tinyint(1) NULL DEFAULT NULL COMMENT '是否删除',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `username`(`username`) USING BTREE,
  UNIQUE INDEX `email`(`email`) USING BTREE,
  UNIQUE INDEX `phone`(`phone`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of users
-- ----------------------------
INSERT INTO `users` VALUES ('app', 'app@163.com', '122323', 'sha256$aa3c0fdaa484834558ffa778fe5b55d5$f801add1c0010f79423dd43b2f40119e8381e7d61fec1824fb544ee9042c81f0', NULL, 1, 0, NULL, NULL, NULL, NULL, '357f8ac2-a271-440a-a003-0db32d15d302', '2025-12-29 21:29:16', '2025-12-29 22:17:18', NULL);
INSERT INTO `users` VALUES ('admin2', 'admin2@qq.com', '121223', 'sha256$bd70a86c14727dcb94501fa65a5c084b$68c6ba38a94db679c529f0edd66387b6a2c25ace41f4a20ffa2d0c70c61e2808', NULL, 1, 0, NULL, NULL, NULL, NULL, '3d0efc90-7c0c-42ca-8426-82bad3fdd0c7', '2025-12-29 21:35:23', '2025-12-29 21:36:08', NULL);
INSERT INTO `users` VALUES ('test', 'test@163.com', '', 'sha256$20b8cc7a83116a7b999b2ad15e2a8b16$6b995907d05fa8dde465fc47d972335727002ffdc78cace61eb8e541b9fdf7b1', NULL, 1, 0, NULL, NULL, NULL, NULL, 'afa20a1c-ea0a-4f65-9928-d2faf9eae6ef', '2025-12-27 13:49:12', '2025-12-29 21:57:39', NULL);
INSERT INTO `users` VALUES ('zhangsan', 'zhangsan@qq.com', '143454545', 'sha256$260c033ace1b0dc1bf21caa8b986d69e$cdc2342aafd284f0d6c8df00e908d7b7b47a59ff022aa2968aaa435941e00086', NULL, 1, 0, NULL, NULL, NULL, NULL, 'd3e906de-b9a6-4a78-a643-233252252776', '2025-12-28 21:45:15', '2025-12-28 21:45:15', NULL);
INSERT INTO `users` VALUES ('admin', 'admin@example.com', NULL, 'sha256$fc7bcee8f0dd0566e809d1920b3524c7$149986dbf144e9aebc6a282959075db9a822012ab76813fb6b71509254b3c7ee', NULL, 1, 1, NULL, NULL, 0, NULL, 'ed6a79d3-0083-4d81-8b48-fc522f686f74', '2025-12-20 13:53:13', '2025-12-28 18:05:37', 0);

-- ----------------------------
-- Triggers structure for table t_samp_standard_base_info
-- ----------------------------
DROP TRIGGER IF EXISTS `trg_basis_after_delete`;
delimiter ;;
CREATE TRIGGER `trg_basis_after_delete` AFTER DELETE ON `t_samp_standard_base_info` FOR EACH ROW BEGIN
                    DELETE FROM t_samp_document_main WHERE source_id = OLD.id AND source_type = 'basis';
                END
;;
delimiter ;

-- ----------------------------
-- Triggers structure for table t_samp_standard_base_info
-- ----------------------------
DROP TRIGGER IF EXISTS `trg_basis_after_insert`;
delimiter ;;
CREATE TRIGGER `trg_basis_after_insert` AFTER INSERT ON `t_samp_standard_base_info` FOR EACH ROW BEGIN
                    INSERT INTO t_samp_document_main (
                        id, title, file_url, created_by, created_time, updated_by, updated_time, source_type, source_id, whether_to_enter
                    ) VALUES (
                        UUID(), NEW.chinese_name, NEW.file_url, NEW.created_by, NEW.created_time, IFNULL(NEW.updated_by, NEW.created_by), NEW.updated_time, 'basis', NEW.id, 0
                    );
                END
;;
delimiter ;

-- ----------------------------
-- Triggers structure for table t_samp_standard_base_info
-- ----------------------------
DROP TRIGGER IF EXISTS `trg_basis_after_update`;
delimiter ;;
CREATE TRIGGER `trg_basis_after_update` AFTER UPDATE ON `t_samp_standard_base_info` FOR EACH ROW BEGIN
                    UPDATE t_samp_document_main SET
                        title = NEW.chinese_name,
                        file_url = NEW.file_url,
                        updated_by = IFNULL(NEW.updated_by, NEW.created_by),
                        updated_time = NEW.updated_time
                    WHERE source_id = NEW.id AND source_type = 'basis';
                END
;;
delimiter ;

-- ----------------------------
-- Triggers structure for table t_samp_office_regulations
-- ----------------------------
DROP TRIGGER IF EXISTS `trg_job_after_delete`;
delimiter ;;
CREATE TRIGGER `trg_job_after_delete` AFTER DELETE ON `t_samp_office_regulations` FOR EACH ROW BEGIN
                    DELETE FROM t_samp_document_main WHERE source_id = OLD.id AND source_type = 'job';
                END
;;
delimiter ;

-- ----------------------------
-- Triggers structure for table t_samp_office_regulations
-- ----------------------------
DROP TRIGGER IF EXISTS `trg_job_after_insert`;
delimiter ;;
CREATE TRIGGER `trg_job_after_insert` AFTER INSERT ON `t_samp_office_regulations` FOR EACH ROW BEGIN
                    INSERT INTO t_samp_document_main (
                        id, title, file_url, created_by, created_time, updated_by, updated_time, source_type, source_id, whether_to_enter
                    ) VALUES (
                        UUID(), NEW.file_name, NEW.file_url, NEW.created_by, NEW.created_time, IFNULL(NEW.updated_by, NEW.created_by), NEW.updated_time, 'job', NEW.id, 0
                    );
                END
;;
delimiter ;

-- ----------------------------
-- Triggers structure for table t_samp_office_regulations
-- ----------------------------
DROP TRIGGER IF EXISTS `trg_job_after_update`;
delimiter ;;
CREATE TRIGGER `trg_job_after_update` AFTER UPDATE ON `t_samp_office_regulations` FOR EACH ROW BEGIN
                    UPDATE t_samp_document_main SET
                        title = NEW.file_name,
                        file_url = NEW.file_url,
                        updated_by = IFNULL(NEW.updated_by, NEW.created_by),
                        updated_time = NEW.updated_time
                    WHERE source_id = NEW.id AND source_type = 'job';
                END
;;
delimiter ;

-- ----------------------------
-- Triggers structure for table t_samp_construction_plan_base_info
-- ----------------------------
DROP TRIGGER IF EXISTS `trg_work_after_delete`;
delimiter ;;
CREATE TRIGGER `trg_work_after_delete` AFTER DELETE ON `t_samp_construction_plan_base_info` FOR EACH ROW BEGIN
                    DELETE FROM t_samp_document_main WHERE source_id = OLD.id AND source_type = 'work';
                END
;;
delimiter ;

-- ----------------------------
-- Triggers structure for table t_samp_construction_plan_base_info
-- ----------------------------
DROP TRIGGER IF EXISTS `trg_work_after_insert`;
delimiter ;;
CREATE TRIGGER `trg_work_after_insert` AFTER INSERT ON `t_samp_construction_plan_base_info` FOR EACH ROW BEGIN
                    INSERT INTO t_samp_document_main (
                        id, title, file_url, created_by, created_time, updated_by, updated_time, source_type, source_id, whether_to_enter
                    ) VALUES (
                        UUID(), NEW.plan_name, NEW.file_url, NEW.created_by, NEW.created_time, IFNULL(NEW.updated_by, NEW.created_by), NEW.updated_time, 'work', NEW.id, 0
                    );
                END
;;
delimiter ;

-- ----------------------------
-- Triggers structure for table t_samp_construction_plan_base_info
-- ----------------------------
DROP TRIGGER IF EXISTS `trg_work_after_update`;
delimiter ;;
CREATE TRIGGER `trg_work_after_update` AFTER UPDATE ON `t_samp_construction_plan_base_info` FOR EACH ROW BEGIN
                    UPDATE t_samp_document_main SET
                        title = NEW.plan_name,
                        file_url = NEW.file_url,
                        updated_by = IFNULL(NEW.updated_by, NEW.created_by),
                        updated_time = NEW.updated_time
                    WHERE source_id = NEW.id AND source_type = 'work';
                END
;;
delimiter ;

SET FOREIGN_KEY_CHECKS = 1;
