﻿/*
 Navicat Premium Dump SQL - FIXED VERSION

 Source Server         : fastApiAdmin
 Source Server Type    : MySQL
 Source Server Version : 80044 (8.0.44)
 Source Host           : localhost:3306
 Source Schema         : fastapiadmin

 Target Server Type    : MySQL
 Target Server Version : 80044 (8.0.44)
 File Encoding         : 65001

 Date: 07/01/2026 15:04:49
 Fixed: 调整表创建顺序，解决外键依赖问题
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ============================================
-- 第一部分：无外键依赖的基础表
-- ============================================

-- ----------------------------
-- Table structure for alembic_version
-- ----------------------------
DROP TABLE IF EXISTS `alembic_version`;
CREATE TABLE `alembic_version`  (
  `version_num` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  PRIMARY KEY (`version_num`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

INSERT INTO `alembic_version` VALUES ('e1db2024739c');

-- ----------------------------
-- Table structure for apscheduler_jobs
-- ----------------------------
DROP TABLE IF EXISTS `apscheduler_jobs`;
CREATE TABLE `apscheduler_jobs`  (
  `id` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `next_run_time` double NULL DEFAULT NULL,
  `job_state` blob NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `ix_apscheduler_jobs_next_run_time`(`next_run_time` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for biz_activity
-- ----------------------------
DROP TABLE IF EXISTS `biz_activity`;
CREATE TABLE `biz_activity`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `uuid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'UUID全局唯一标识',
  `user_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户名(脱敏)',
  `action` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '操作类型',
  `service_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '服务名称',
  `service_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '服务类型',
  `sort_order` int NOT NULL DEFAULT 0 COMMENT '排序顺序',
  `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '是否启用',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注',
  `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `updated_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uk_uuid`(`uuid` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户活动记录表' ROW_FORMAT = Dynamic;

INSERT INTO `biz_activity` VALUES (1, '48a884c6-dfab-11f0-b85b-ccd9acf0abd0', '张**', '预约', '宝宝起名', '服务', 1, '0', NULL, '2025-12-23 10:58:39', '2025-12-23 10:58:39');
INSERT INTO `biz_activity` VALUES (2, '48a8cf7e-dfab-11f0-b85b-ccd9acf0abd0', '李**', '完成', '个人改名', '测算', 2, '0', NULL, '2025-12-23 10:58:39', '2025-12-23 10:58:39');
INSERT INTO `biz_activity` VALUES (3, '48a8d32d-dfab-11f0-b85b-ccd9acf0abd0', '王**', '购买', '公司起名', '套餐', 3, '0', NULL, '2025-12-23 10:58:39', '2025-12-23 10:58:39');
INSERT INTO `biz_activity` VALUES (4, '48a8d409-dfab-11f0-b85b-ccd9acf0abd0', '赵**', '查看', '姓名详解', '报告', 4, '0', NULL, '2025-12-23 10:58:39', '2025-12-23 10:58:39');

-- ============================================
-- 第二部分：核心系统表（被其他表依赖）
-- ============================================

-- ----------------------------
-- Table structure for sys_dept (部门表 - 自引用)
-- ----------------------------
DROP TABLE IF EXISTS `sys_dept`;
CREATE TABLE `sys_dept`  (
  `name` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '部门名称',
  `order` int NOT NULL COMMENT '显示排序',
  `code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门编码',
  `leader` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门负责人',
  `phone` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机',
  `email` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邮箱',
  `parent_id` int NULL DEFAULT NULL COMMENT '父级部门ID',
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `uuid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'UUID全局唯一标识',
  `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用(0:启用 1:禁用)',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注/描述',
  `created_time` datetime NOT NULL COMMENT '创建时间',
  `updated_time` datetime NOT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uuid`(`uuid` ASC) USING BTREE,
  INDEX `ix_sys_dept_code`(`code` ASC) USING BTREE,
  INDEX `ix_sys_dept_parent_id`(`parent_id` ASC) USING BTREE,
  CONSTRAINT `sys_dept_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `sys_dept` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '部门表' ROW_FORMAT = Dynamic;

INSERT INTO `sys_dept` VALUES ('集团总公司', 1, 'GROUP', '部门负责人', '1582112620', 'deptadmin@example.com', NULL, 1, '90054526-eefa-4e65-a372-4ede48326662', '0', '集团总公司', '2025-12-16 10:13:01', '2025-12-16 10:13:01');

-- ----------------------------
-- Table structure for sys_user (用户表 - 核心表)
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user`  (
  `username` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户名/登录账号',
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '密码哈希',
  `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '昵称',
  `mobile` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机号',
  `email` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邮箱',
  `gender` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '性别(0:男 1:女 2:未知)',
  `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头像URL地址',
  `is_superuser` tinyint(1) NOT NULL COMMENT '是否超管',
  `last_login` datetime NULL DEFAULT NULL COMMENT '最后登录时间',
  `gitee_login` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'Gitee登录',
  `github_login` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'Github登录',
  `wx_login` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '微信登录',
  `qq_login` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'QQ登录',
  `dept_id` int NULL DEFAULT NULL COMMENT '部门ID',
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `uuid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'UUID全局唯一标识',
  `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用(0:启用 1:禁用)',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注/描述',
  `created_time` datetime NOT NULL COMMENT '创建时间',
  `updated_time` datetime NOT NULL COMMENT '更新时间',
  `created_id` int NULL DEFAULT NULL COMMENT '创建人ID',
  `updated_id` int NULL DEFAULT NULL COMMENT '更新人ID',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `username`(`username` ASC) USING BTREE,
  UNIQUE INDEX `uuid`(`uuid` ASC) USING BTREE,
  UNIQUE INDEX `mobile`(`mobile` ASC) USING BTREE,
  UNIQUE INDEX `email`(`email` ASC) USING BTREE,
  INDEX `ix_sys_user_updated_id`(`updated_id` ASC) USING BTREE,
  INDEX `ix_sys_user_dept_id`(`dept_id` ASC) USING BTREE,
  INDEX `ix_sys_user_created_id`(`created_id` ASC) USING BTREE,
  CONSTRAINT `sys_user_ibfk_1` FOREIGN KEY (`dept_id`) REFERENCES `sys_dept` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `sys_user_ibfk_2` FOREIGN KEY (`created_id`) REFERENCES `sys_user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `sys_user_ibfk_3` FOREIGN KEY (`updated_id`) REFERENCES `sys_user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户表' ROW_FORMAT = Dynamic;

INSERT INTO `sys_user` VALUES ('admin', '$2b$12$e2IJgS/cvHgJ0H3G7Xa08OXoXnk6N/NX3IZRtubBDElA0VLZhkNOa', '超级管理员', NULL, NULL, '0', 'https://service.fastapiadmin.com/api/v1/static/image/avatar.png', 1, NULL, NULL, NULL, NULL, NULL, 1, 1, 'd73858d6-eeb0-479b-9a8e-67dcd4623700', '0', '超级管理员', '2025-12-16 10:13:01', '2025-12-16 10:13:01', NULL, NULL);

-- ----------------------------
-- Table structure for sys_dict_type (字典类型表)
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict_type`;
CREATE TABLE `sys_dict_type`  (
  `dict_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典名称',
  `dict_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典类型',
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `uuid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'UUID全局唯一标识',
  `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用(0:启用 1:禁用)',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注/描述',
  `created_time` datetime NOT NULL COMMENT '创建时间',
  `updated_time` datetime NOT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `dict_type`(`dict_type` ASC) USING BTREE,
  UNIQUE INDEX `uuid`(`uuid` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典类型表' ROW_FORMAT = Dynamic;

INSERT INTO `sys_dict_type` VALUES ('用户性别', 'sys_user_sex', 1, '31cd5ec8-0d90-4c65-be20-43e8a9fee9c2', '0', '用户性别列表', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_type` VALUES ('系统是否', 'sys_yes_no', 2, '55f0e9cd-c42f-4e0d-bc25-e32c263f4868', '0', '系统是否列表', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_type` VALUES ('系统状态', 'sys_common_status', 3, '3a2b48c2-4a60-4f5e-ae9a-54c12f9df303', '0', '系统状态', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_type` VALUES ('通知类型', 'sys_notice_type', 4, '7be98135-e4a4-40f1-a149-54ea95077039', '0', '通知类型列表', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_type` VALUES ('操作类型', 'sys_oper_type', 5, '52d9e9f8-48fe-454a-9aaf-4d88a957c355', '0', '操作类型列表', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_type` VALUES ('任务存储器', 'sys_job_store', 6, '7d501ad5-e1e5-4cbc-9caa-14d0b32dbd0d', '0', '任务分组列表', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_type` VALUES ('任务执行器', 'sys_job_executor', 7, '5f1b8856-c9e6-4682-bd51-d48a466fd039', '0', '任务执行器列表', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_type` VALUES ('任务函数', 'sys_job_function', 8, '2feb0f4c-2500-410c-bde5-77fc32f0797f', '0', '任务函数列表', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_type` VALUES ('任务触发器', 'sys_job_trigger', 9, 'f33ca80d-d218-4b0a-9aec-6fe6d50a82ed', '0', '任务触发器列表', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_type` VALUES ('表格回显样式', 'sys_list_class', 10, '62665032-b194-4db1-806b-d522dc562cc0', '0', '表格回显样式列表', '2025-12-16 10:13:01', '2025-12-16 10:13:01');

-- ----------------------------
-- Table structure for sys_role (角色表)
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role`  (
  `name` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色名称',
  `code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色编码',
  `order` int NOT NULL COMMENT '显示排序',
  `data_scope` int NOT NULL COMMENT '数据权限范围(1:仅本人 2:本部门 3:本部门及以下 4:全部 5:自定义)',
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `uuid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'UUID全局唯一标识',
  `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用(0:启用 1:禁用)',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注/描述',
  `created_time` datetime NOT NULL COMMENT '创建时间',
  `updated_time` datetime NOT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uuid`(`uuid` ASC) USING BTREE,
  INDEX `ix_sys_role_code`(`code` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色表' ROW_FORMAT = Dynamic;

INSERT INTO `sys_role` VALUES ('管理员角色', 'ADMIN', 1, 4, 1, '9390fb49-de45-4ad2-8edc-d2cc74f6b73c', '0', '初始化角色', '2025-12-16 10:13:01', '2025-12-16 10:13:01');

-- ----------------------------
-- Table structure for sys_menu (菜单表 - 自引用)
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu`  (
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '菜单名称',
  `type` int NOT NULL COMMENT '菜单类型(1:目录 2:菜单 3:按钮/权限 4:链接)',
  `order` int NOT NULL COMMENT '显示排序',
  `permission` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限标识(如:module_system:user:list)',
  `icon` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单图标',
  `route_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '路由名称',
  `route_path` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '路由路径',
  `component_path` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组件路径',
  `redirect` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '重定向地址',
  `hidden` tinyint(1) NOT NULL COMMENT '是否隐藏(True:隐藏 False:显示)',
  `keep_alive` tinyint(1) NOT NULL COMMENT '是否缓存(True:是 False:否)',
  `always_show` tinyint(1) NOT NULL COMMENT '是否始终显示(True:是 False:否)',
  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单标题',
  `params` json NULL COMMENT '路由参数(JSON对象)',
  `affix` tinyint(1) NOT NULL COMMENT '是否固定标签页(True:是 False:否)',
  `parent_id` int NULL DEFAULT NULL COMMENT '父菜单ID',
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `uuid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'UUID全局唯一标识',
  `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用(0:启用 1:禁用)',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注/描述',
  `created_time` datetime NOT NULL COMMENT '创建时间',
  `updated_time` datetime NOT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uuid`(`uuid` ASC) USING BTREE,
  INDEX `ix_sys_menu_parent_id`(`parent_id` ASC) USING BTREE,
  CONSTRAINT `sys_menu_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `sys_menu` (`id`) ON DELETE SET NULL ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 113 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '菜单表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_position (岗位表)
-- ----------------------------
DROP TABLE IF EXISTS `sys_position`;
CREATE TABLE `sys_position`  (
  `name` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '岗位名称',
  `order` int NOT NULL COMMENT '显示排序',
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `uuid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'UUID全局唯一标识',
  `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用(0:启用 1:禁用)',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注/描述',
  `created_time` datetime NOT NULL COMMENT '创建时间',
  `updated_time` datetime NOT NULL COMMENT '更新时间',
  `created_id` int NULL DEFAULT NULL COMMENT '创建人ID',
  `updated_id` int NULL DEFAULT NULL COMMENT '更新人ID',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uuid`(`uuid` ASC) USING BTREE,
  INDEX `ix_sys_position_updated_id`(`updated_id` ASC) USING BTREE,
  INDEX `ix_sys_position_created_id`(`created_id` ASC) USING BTREE,
  CONSTRAINT `sys_position_ibfk_1` FOREIGN KEY (`created_id`) REFERENCES `sys_user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `sys_position_ibfk_2` FOREIGN KEY (`updated_id`) REFERENCES `sys_user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '岗位表' ROW_FORMAT = Dynamic;


-- ============================================
-- 第三部分：依赖核心表的业务表
-- ============================================

-- ----------------------------
-- Table structure for sys_dict_data (字典数据表 - 依赖 sys_dict_type)
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict_data`;
CREATE TABLE `sys_dict_data`  (
  `dict_sort` int NOT NULL COMMENT '字典排序',
  `dict_label` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典标签',
  `dict_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典键值',
  `css_class` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '样式属性（其他样式扩展）',
  `list_class` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '表格回显样式',
  `is_default` tinyint(1) NOT NULL COMMENT '是否默认（True是 False否）',
  `dict_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典类型',
  `dict_type_id` int NOT NULL COMMENT '字典类型ID',
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `uuid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'UUID全局唯一标识',
  `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用(0:启用 1:禁用)',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注/描述',
  `created_time` datetime NOT NULL COMMENT '创建时间',
  `updated_time` datetime NOT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uuid`(`uuid` ASC) USING BTREE,
  INDEX `dict_type_id`(`dict_type_id` ASC) USING BTREE,
  CONSTRAINT `sys_dict_data_ibfk_1` FOREIGN KEY (`dict_type_id`) REFERENCES `sys_dict_type` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 35 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典数据表' ROW_FORMAT = Dynamic;

INSERT INTO `sys_dict_data` VALUES (1, '男', '0', 'blue', NULL, 1, 'sys_user_sex', 1, 1, '85d1d84e-b04f-4d1e-a943-f34c0c99d743', '0', '性别男', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (2, '女', '1', 'pink', NULL, 0, 'sys_user_sex', 1, 2, 'f3e6e816-a8b8-40eb-be14-f39310576b6d', '0', '性别女', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (3, '未知', '2', 'red', NULL, 0, 'sys_user_sex', 1, 3, '4269fd0d-3195-4322-8a7c-8a744a322a4a', '0', '性别未知', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (1, '是', '1', '', 'primary', 1, 'sys_yes_no', 2, 4, '0b97c13e-4231-47d0-8cb6-271ae75c9f44', '0', '是', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (2, '否', '0', '', 'danger', 0, 'sys_yes_no', 2, 5, '9916c41a-e121-4ab1-9922-3a1c2fce16a3', '0', '否', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (1, '启用', '1', '', 'primary', 0, 'sys_common_status', 3, 6, '9cee3fc2-6cae-4a1a-a85c-1d2f2becbdc6', '0', '启用状态', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (2, '停用', '0', '', 'danger', 0, 'sys_common_status', 3, 7, 'ff1f8d1b-5d71-49ef-bf88-c6543bd0684b', '0', '停用状态', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (1, '通知', '1', 'blue', 'warning', 1, 'sys_notice_type', 4, 8, '3bcc9060-1069-4353-a7c1-b28e41d911f2', '0', '通知', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (2, '公告', '2', 'orange', 'success', 0, 'sys_notice_type', 4, 9, 'be369d14-1f83-4e0f-ade0-ef6bffc65c58', '0', '公告', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (99, '其他', '0', '', 'info', 0, 'sys_oper_type', 5, 10, '9454cb08-5943-4246-9206-bdcbc9e64cbf', '0', '其他操作', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (1, '新增', '1', '', 'info', 0, 'sys_oper_type', 5, 11, 'd9bb84f6-56fe-47e0-9586-730f5e1be43b', '0', '新增操作', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (2, '修改', '2', '', 'info', 0, 'sys_oper_type', 5, 12, '912d6e5c-acf9-41e8-bcb5-7c0ce765ffc4', '0', '修改操作', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (3, '删除', '3', '', 'danger', 0, 'sys_oper_type', 5, 13, '816989b2-976d-4615-89b9-eb1df57b8b04', '0', '删除操作', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (4, '分配权限', '4', '', 'primary', 0, 'sys_oper_type', 5, 14, '92c5eab0-9642-4b92-9d81-bd23ac8f8da3', '0', '授权操作', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (5, '导出', '5', '', 'warning', 0, 'sys_oper_type', 5, 15, '00b8d8d7-35b0-4d2b-ad06-aad0ae33ec69', '0', '导出操作', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (6, '导入', '6', '', 'warning', 0, 'sys_oper_type', 5, 16, 'ca2add79-9872-4f8a-8b4c-471402bc4cf0', '0', '导入操作', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (7, '强退', '7', '', 'danger', 0, 'sys_oper_type', 5, 17, '2c8e2db3-2177-4836-839f-a047b0c7cd1e', '0', '强退操作', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (8, '生成代码', '8', '', 'warning', 0, 'sys_oper_type', 5, 18, '56302a23-a52a-4163-8dda-0b8551ba2fc8', '0', '生成操作', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (9, '清空数据', '9', '', 'danger', 0, 'sys_oper_type', 5, 19, '8718a516-7ec2-4c24-9511-8343ffc96b7f', '0', '清空操作', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (1, '默认(Memory)', 'default', '', NULL, 1, 'sys_job_store', 6, 20, '94458f83-d00a-414e-8103-f2a08aa29a68', '0', '默认分组', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (2, '数据库(Sqlalchemy)', 'sqlalchemy', '', NULL, 0, 'sys_job_store', 6, 21, '7874db4e-f317-4b57-8190-db56e98f7ed0', '0', '数据库分组', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (3, '数据库(Redis)', 'redis', '', NULL, 0, 'sys_job_store', 6, 22, 'fc2486cc-1b17-4a27-adba-99784fcb456a', '0', 'reids分组', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (1, '线程池', 'default', '', NULL, 0, 'sys_job_executor', 7, 23, 'd37b6323-f598-41b3-ac2f-67cecb2769b9', '0', '线程池', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (2, '进程池', 'processpool', '', NULL, 0, 'sys_job_executor', 7, 24, '8cc0867c-e332-41ef-ad6d-008501930aec', '0', '进程池', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (1, '演示函数', 'scheduler_test.job', '', NULL, 1, 'sys_job_function', 8, 25, 'afa29a4b-07a1-47d6-8759-6dca946883bd', '0', '演示函数', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (1, '指定日期(date)', 'date', '', NULL, 1, 'sys_job_trigger', 9, 26, '44b88d69-9d77-4f93-8d17-57e430f71680', '0', '指定日期任务触发器', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (2, '间隔触发器(interval)', 'interval', '', NULL, 0, 'sys_job_trigger', 9, 27, '55387b1f-d069-4f3a-84e1-1bd05d29e1d3', '0', '间隔触发器任务触发器', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (3, 'cron表达式', 'cron', '', NULL, 0, 'sys_job_trigger', 9, 28, 'ffc9d6ee-aab4-46f5-bd34-8f376e2aa385', '0', '间隔触发器任务触发器', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (1, '默认(default)', 'default', '', NULL, 1, 'sys_list_class', 10, 29, '82bea984-48f2-48b7-b49a-a7cdce35c610', '0', '默认表格回显样式', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (2, '主要(primary)', 'primary', '', NULL, 0, 'sys_list_class', 10, 30, 'a35467a0-cb56-4249-a787-a6b64fb76bc6', '0', '主要表格回显样式', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (3, '成功(success)', 'success', '', NULL, 0, 'sys_list_class', 10, 31, '6380ae64-f7a2-4a5d-b033-f6e34f2e7042', '0', '成功表格回显样式', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (4, '信息(info)', 'info', '', NULL, 0, 'sys_list_class', 10, 32, 'dc633cf0-27af-4a5d-96fa-e039774ac378', '0', '信息表格回显样式', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (5, '警告(warning)', 'warning', '', NULL, 0, 'sys_list_class', 10, 33, 'd6bf800f-9b33-4917-9baf-c9eb4a8d73cb', '0', '警告表格回显样式', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_dict_data` VALUES (6, '危险(danger)', 'danger', '', NULL, 0, 'sys_list_class', 10, 34, '324f9457-31f7-4f48-8550-c7b19c4a1d0f', '0', '危险表格回显样式', '2025-12-16 10:13:01', '2025-12-16 10:13:01');

-- ----------------------------
-- Table structure for app_ai_mcp (依赖 sys_user)
-- ----------------------------
DROP TABLE IF EXISTS `app_ai_mcp`;
CREATE TABLE `app_ai_mcp`  (
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'MCP 名称',
  `type` int NOT NULL COMMENT 'MCP 类型(0:stdio 1:sse)',
  `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '远程 SSE 地址',
  `command` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'MCP 命令',
  `args` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'MCP 命令参数',
  `env` json NULL COMMENT 'MCP 环境变量',
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `uuid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'UUID全局唯一标识',
  `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用(0:启用 1:禁用)',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注/描述',
  `created_time` datetime NOT NULL COMMENT '创建时间',
  `updated_time` datetime NOT NULL COMMENT '更新时间',
  `created_id` int NULL DEFAULT NULL COMMENT '创建人ID',
  `updated_id` int NULL DEFAULT NULL COMMENT '更新人ID',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uuid`(`uuid` ASC) USING BTREE,
  INDEX `ix_app_ai_mcp_created_id`(`created_id` ASC) USING BTREE,
  INDEX `ix_app_ai_mcp_updated_id`(`updated_id` ASC) USING BTREE,
  CONSTRAINT `app_ai_mcp_ibfk_1` FOREIGN KEY (`created_id`) REFERENCES `sys_user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `app_ai_mcp_ibfk_2` FOREIGN KEY (`updated_id`) REFERENCES `sys_user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'MCP 服务器表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for app_job (依赖 sys_user)
-- ----------------------------
DROP TABLE IF EXISTS `app_job`;
CREATE TABLE `app_job`  (
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '任务名称',
  `jobstore` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '存储器',
  `executor` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '执行器:将运行此作业的执行程序的名称',
  `trigger` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '触发器:控制此作业计划的 trigger 对象',
  `trigger_args` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '触发器参数',
  `func` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务函数',
  `args` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '位置参数',
  `kwargs` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '关键字参数',
  `coalesce` tinyint(1) NULL DEFAULT NULL COMMENT '是否合并运行:是否在多个运行时间到期时仅运行作业一次',
  `max_instances` int NULL DEFAULT NULL COMMENT '最大实例数:允许的最大并发执行实例数',
  `start_date` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '开始时间',
  `end_date` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '结束时间',
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `uuid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'UUID全局唯一标识',
  `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用(0:启用 1:禁用)',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注/描述',
  `created_time` datetime NOT NULL COMMENT '创建时间',
  `updated_time` datetime NOT NULL COMMENT '更新时间',
  `created_id` int NULL DEFAULT NULL COMMENT '创建人ID',
  `updated_id` int NULL DEFAULT NULL COMMENT '更新人ID',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uuid`(`uuid` ASC) USING BTREE,
  INDEX `ix_app_job_updated_id`(`updated_id` ASC) USING BTREE,
  INDEX `ix_app_job_created_id`(`created_id` ASC) USING BTREE,
  CONSTRAINT `app_job_ibfk_1` FOREIGN KEY (`created_id`) REFERENCES `sys_user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `app_job_ibfk_2` FOREIGN KEY (`updated_id`) REFERENCES `sys_user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '定时任务调度表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for app_job_log (依赖 app_job)
-- ----------------------------
DROP TABLE IF EXISTS `app_job_log`;
CREATE TABLE `app_job_log`  (
  `job_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务名称',
  `job_group` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务组名',
  `job_executor` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '任务执行器',
  `invoke_target` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '调用目标字符串',
  `job_args` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '位置参数',
  `job_kwargs` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '关键字参数',
  `job_trigger` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '任务触发器',
  `job_message` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '日志信息',
  `exception_info` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '异常信息',
  `job_id` int NULL DEFAULT NULL COMMENT '任务ID',
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `uuid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'UUID全局唯一标识',
  `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用(0:启用 1:禁用)',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注/描述',
  `created_time` datetime NOT NULL COMMENT '创建时间',
  `updated_time` datetime NOT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uuid`(`uuid` ASC) USING BTREE,
  INDEX `ix_app_job_log_job_id`(`job_id` ASC) USING BTREE,
  CONSTRAINT `app_job_log_ibfk_1` FOREIGN KEY (`job_id`) REFERENCES `app_job` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '定时任务调度日志表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for app_myapp (依赖 sys_user)
-- ----------------------------
DROP TABLE IF EXISTS `app_myapp`;
CREATE TABLE `app_myapp`  (
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '应用名称',
  `access_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '访问地址',
  `icon_url` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '应用图标URL',
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `uuid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'UUID全局唯一标识',
  `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用(0:启用 1:禁用)',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注/描述',
  `created_time` datetime NOT NULL COMMENT '创建时间',
  `updated_time` datetime NOT NULL COMMENT '更新时间',
  `created_id` int NULL DEFAULT NULL COMMENT '创建人ID',
  `updated_id` int NULL DEFAULT NULL COMMENT '更新人ID',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uuid`(`uuid` ASC) USING BTREE,
  INDEX `ix_app_myapp_updated_id`(`updated_id` ASC) USING BTREE,
  INDEX `ix_app_myapp_created_id`(`created_id` ASC) USING BTREE,
  CONSTRAINT `app_myapp_ibfk_1` FOREIGN KEY (`created_id`) REFERENCES `sys_user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `app_myapp_ibfk_2` FOREIGN KEY (`updated_id`) REFERENCES `sys_user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '应用系统表' ROW_FORMAT = Dynamic;


-- ----------------------------
-- Table structure for biz_user_name_record (依赖 sys_user)
-- ----------------------------
DROP TABLE IF EXISTS `biz_user_name_record`;
CREATE TABLE `biz_user_name_record`  (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `uuid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'UUID全局唯一标识',
  `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT '是否启用(0:启用 1:禁用)',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注/描述',
  `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `updated_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `created_id` int NULL DEFAULT NULL COMMENT '创建人ID',
  `updated_id` int NULL DEFAULT NULL COMMENT '更新人ID',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '起的名字',
  `surname` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '姓氏',
  `full_name` varchar(70) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '完整姓名',
  `source` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '出处（如：诗经、楚辞）',
  `source_text` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '原文/出处原句',
  `meaning` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '名字含义/寓意',
  `gender` smallint NULL DEFAULT 0 COMMENT '性别(0:未知 1:男 2:女)',
  `birth_year` int NULL DEFAULT NULL COMMENT '出生年份',
  `birth_month` int NULL DEFAULT NULL COMMENT '出生月份',
  `birth_day` int NULL DEFAULT NULL COMMENT '出生日期',
  `birth_hour` int NULL DEFAULT NULL COMMENT '出生时辰(0-23)',
  `lunar_birth` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '农历生日',
  `wuxing` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '五行属性（如：金木水火土）',
  `bazi` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '八字',
  `wuxing_lack` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '五行缺失',
  `name_type` smallint NULL DEFAULT 1 COMMENT '起名类型(1:宝宝起名 2:成人改名 3:公司起名 4:店铺起名)',
  `score` int NULL DEFAULT NULL COMMENT '名字评分(0-100)',
  `score_detail` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '评分详情(JSON)',
  `is_favorite` smallint NOT NULL DEFAULT 0 COMMENT '是否收藏(0:否 1:是)',
  `is_used` smallint NOT NULL DEFAULT 0 COMMENT '是否已使用(0:否 1:是)',
  `channel` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '来源渠道（如：小程序、APP、网页）',
  `ip_address` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户IP地址',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uk_uuid`(`uuid` ASC) USING BTREE,
  INDEX `idx_created_id`(`created_id` ASC) USING BTREE,
  INDEX `idx_name`(`name` ASC) USING BTREE,
  INDEX `idx_full_name`(`full_name` ASC) USING BTREE,
  INDEX `idx_name_type`(`name_type` ASC) USING BTREE,
  INDEX `idx_is_favorite`(`is_favorite` ASC) USING BTREE,
  INDEX `idx_created_time`(`created_time` ASC) USING BTREE,
  INDEX `fk_name_record_updated`(`updated_id` ASC) USING BTREE,
  CONSTRAINT `fk_name_record_created` FOREIGN KEY (`created_id`) REFERENCES `sys_user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_name_record_updated` FOREIGN KEY (`updated_id`) REFERENCES `sys_user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户起名记录表' ROW_FORMAT = Dynamic;

INSERT INTO `biz_user_name_record` VALUES (1, '07d6a333-dfd2-11f0-b85b-ccd9acf0abd0', '0', NULL, '2025-12-23 15:36:01', '2025-12-23 15:36:01', NULL, NULL, '清芷', NULL, NULL, '楚辞', '岸芷汀兰，郁郁青青', '清雅如芷兰，品性高洁', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, 0, 0, NULL, NULL);
INSERT INTO `biz_user_name_record` VALUES (2, '07d705d0-dfd2-11f0-b85b-ccd9acf0abd0', '0', NULL, '2025-12-23 15:36:01', '2025-12-23 15:36:01', NULL, NULL, '云帆', NULL, NULL, '行路难', '长风破浪会有时，直挂云帆济沧海', '志向远大，乘风破浪', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, 0, 0, NULL, NULL);
INSERT INTO `biz_user_name_record` VALUES (3, '07d7105f-dfd2-11f0-b85b-ccd9acf0abd0', '0', NULL, '2025-12-23 15:36:01', '2025-12-23 15:36:01', NULL, NULL, '望舒', NULL, NULL, '离骚', '前望舒使先驱兮，后飞廉使奔属', '望舒为月神驾车，寓意光明引路', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, 0, 0, NULL, NULL);
INSERT INTO `biz_user_name_record` VALUES (4, '07d7121f-dfd2-11f0-b85b-ccd9acf0abd0', '0', NULL, '2025-12-23 15:36:01', '2025-12-23 15:36:01', NULL, NULL, '思齐', NULL, NULL, '论语', '见贤思齐焉，见不贤而内自省也', '见贤思齐，不断进取', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, 0, 0, NULL, NULL);
INSERT INTO `biz_user_name_record` VALUES (5, '07d71353-dfd2-11f0-b85b-ccd9acf0abd0', '0', NULL, '2025-12-23 15:36:01', '2025-12-23 15:36:01', NULL, NULL, '若华', NULL, NULL, '楚辞', '桂树丛生兮山之幽，偃蹇连蜷兮枝相缭', '如花般美好', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, 0, 0, NULL, NULL);
INSERT INTO `biz_user_name_record` VALUES (6, '07d714a7-dfd2-11f0-b85b-ccd9acf0abd0', '0', NULL, '2025-12-23 15:36:01', '2025-12-23 15:36:01', NULL, NULL, '嘉言', NULL, NULL, '尚书', '嘉言罔攸伏，野无遗贤', '美好的言辞，贤德之人', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, 0, 0, NULL, NULL);
INSERT INTO `biz_user_name_record` VALUES (7, '07d715c9-dfd2-11f0-b85b-ccd9acf0abd0', '0', NULL, '2025-12-23 15:36:01', '2025-12-23 15:36:01', NULL, NULL, '明哲', NULL, NULL, '诗经', '既明且哲，以保其身', '聪明睿智，明辨是非', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, 0, 0, NULL, NULL);
INSERT INTO `biz_user_name_record` VALUES (8, '07d716da-dfd2-11f0-b85b-ccd9acf0abd0', '0', NULL, '2025-12-23 15:36:01', '2025-12-23 15:36:01', NULL, NULL, '子衿', NULL, NULL, '诗经', '青青子衿，悠悠我心', '青衿学子，才华横溢', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, 0, 0, NULL, NULL);
INSERT INTO `biz_user_name_record` VALUES (9, '07d71d09-dfd2-11f0-b85b-ccd9acf0abd0', '0', NULL, '2025-12-23 15:36:01', '2025-12-23 15:36:01', NULL, NULL, '静姝', NULL, NULL, '诗经', '静女其姝，俟我于城隅', '文静美好的女子', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, 0, 0, NULL, NULL);
INSERT INTO `biz_user_name_record` VALUES (10, '07d71edf-dfd2-11f0-b85b-ccd9acf0abd0', '0', NULL, '2025-12-23 15:36:01', '2025-12-23 15:36:01', NULL, NULL, '修远', NULL, NULL, '离骚', '路漫漫其修远兮，吾将上下而求索', '追求真理，上下求索', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, 0, 0, NULL, NULL);
INSERT INTO `biz_user_name_record` VALUES (11, '07d72034-dfd2-11f0-b85b-ccd9acf0abd0', '0', NULL, '2025-12-23 15:36:01', '2025-12-23 15:36:01', NULL, NULL, '星汉', NULL, NULL, '观沧海', '日月之行，若出其中；星汉灿烂，若出其里', '胸怀宽广如星河', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, 0, 0, NULL, NULL);
INSERT INTO `biz_user_name_record` VALUES (12, '07d7215a-dfd2-11f0-b85b-ccd9acf0abd0', '0', NULL, '2025-12-23 15:36:01', '2025-12-23 15:36:01', NULL, NULL, '霁月', NULL, NULL, '世说新语', '光风霁月，坦荡胸怀', '雨后明月，心胸坦荡', 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, NULL, NULL, 0, 0, NULL, NULL);

-- ----------------------------
-- Table structure for gen_table (依赖 sys_user)
-- ----------------------------
DROP TABLE IF EXISTS `gen_table`;
CREATE TABLE `gen_table`  (
  `table_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '表名称',
  `table_comment` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '表描述',
  `class_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '实体类名称',
  `package_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '生成包路径',
  `module_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '生成模块名',
  `business_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '生成业务名',
  `function_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '生成功能名',
  `sub_table_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '关联子表的表名',
  `sub_table_fk_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '子表关联的外键名',
  `parent_menu_id` int NULL DEFAULT NULL COMMENT '父菜单ID',
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `uuid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'UUID全局唯一标识',
  `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用(0:启用 1:禁用)',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注/描述',
  `created_time` datetime NOT NULL COMMENT '创建时间',
  `updated_time` datetime NOT NULL COMMENT '更新时间',
  `created_id` int NULL DEFAULT NULL COMMENT '创建人ID',
  `updated_id` int NULL DEFAULT NULL COMMENT '更新人ID',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uuid`(`uuid` ASC) USING BTREE,
  INDEX `ix_gen_table_created_id`(`created_id` ASC) USING BTREE,
  INDEX `ix_gen_table_updated_id`(`updated_id` ASC) USING BTREE,
  CONSTRAINT `gen_table_ibfk_1` FOREIGN KEY (`created_id`) REFERENCES `sys_user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `gen_table_ibfk_2` FOREIGN KEY (`updated_id`) REFERENCES `sys_user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '代码生成表' ROW_FORMAT = Dynamic;


-- ----------------------------
-- Table structure for gen_table_column (依赖 gen_table, sys_user)
-- ----------------------------
DROP TABLE IF EXISTS `gen_table_column`;
CREATE TABLE `gen_table_column`  (
  `column_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '列名称',
  `column_comment` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '列描述',
  `column_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '列类型',
  `column_length` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '列长度',
  `column_default` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '列默认值',
  `is_pk` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否主键',
  `is_increment` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否自增',
  `is_nullable` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否允许为空',
  `is_unique` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否唯一',
  `python_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'Python类型',
  `python_field` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'Python字段名',
  `is_insert` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否为新增字段',
  `is_edit` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否编辑字段',
  `is_list` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否列表字段',
  `is_query` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否查询字段',
  `query_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '查询方式',
  `html_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '显示类型',
  `dict_type` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典类型',
  `sort` int NOT NULL COMMENT '排序',
  `table_id` int NOT NULL COMMENT '归属表编号',
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `uuid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'UUID全局唯一标识',
  `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用(0:启用 1:禁用)',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注/描述',
  `created_time` datetime NOT NULL COMMENT '创建时间',
  `updated_time` datetime NOT NULL COMMENT '更新时间',
  `created_id` int NULL DEFAULT NULL COMMENT '创建人ID',
  `updated_id` int NULL DEFAULT NULL COMMENT '更新人ID',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uuid`(`uuid` ASC) USING BTREE,
  INDEX `ix_gen_table_column_created_id`(`created_id` ASC) USING BTREE,
  INDEX `ix_gen_table_column_table_id`(`table_id` ASC) USING BTREE,
  INDEX `ix_gen_table_column_updated_id`(`updated_id` ASC) USING BTREE,
  CONSTRAINT `gen_table_column_ibfk_1` FOREIGN KEY (`table_id`) REFERENCES `gen_table` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT,
  CONSTRAINT `gen_table_column_ibfk_2` FOREIGN KEY (`created_id`) REFERENCES `sys_user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `gen_table_column_ibfk_3` FOREIGN KEY (`updated_id`) REFERENCES `sys_user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '代码生成表字段' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for gen_demo (依赖 sys_user)
-- ----------------------------
DROP TABLE IF EXISTS `gen_demo`;
CREATE TABLE `gen_demo`  (
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '名称',
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `uuid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'UUID全局唯一标识',
  `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用(0:启用 1:禁用)',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注/描述',
  `created_time` datetime NOT NULL COMMENT '创建时间',
  `updated_time` datetime NOT NULL COMMENT '更新时间',
  `created_id` int NULL DEFAULT NULL COMMENT '创建人ID',
  `updated_id` int NULL DEFAULT NULL COMMENT '更新人ID',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uuid`(`uuid` ASC) USING BTREE,
  INDEX `ix_gen_demo_created_id`(`created_id` ASC) USING BTREE,
  INDEX `ix_gen_demo_updated_id`(`updated_id` ASC) USING BTREE,
  CONSTRAINT `gen_demo_ibfk_1` FOREIGN KEY (`created_id`) REFERENCES `sys_user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `gen_demo_ibfk_2` FOREIGN KEY (`updated_id`) REFERENCES `sys_user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '示例表' ROW_FORMAT = Dynamic;


-- ----------------------------
-- Table structure for miniapp_user
-- ----------------------------
DROP TABLE IF EXISTS `miniapp_user`;
CREATE TABLE `miniapp_user`  (
  `openid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '微信openid',
  `unionid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '微信unionid',
  `session_key` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '会话密钥',
  `nickname` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '昵称',
  `avatar` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头像URL',
  `phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '手机号',
  `last_login` datetime NULL DEFAULT NULL COMMENT '最后登录时间',
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `uuid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'UUID全局唯一标识',
  `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用(0:启用 1:禁用)',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注/描述',
  `created_time` datetime NOT NULL COMMENT '创建时间',
  `updated_time` datetime NOT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uuid`(`uuid` ASC) USING BTREE,
  UNIQUE INDEX `ix_miniapp_user_openid`(`openid` ASC) USING BTREE,
  UNIQUE INDEX `unionid`(`unionid` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '小程序用户表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_log (依赖 sys_user)
-- ----------------------------
DROP TABLE IF EXISTS `sys_log`;
CREATE TABLE `sys_log`  (
  `type` int NOT NULL COMMENT '日志类型(1登录日志 2操作日志)',
  `request_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '请求路径',
  `request_method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '请求方式',
  `request_payload` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '请求体',
  `request_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '请求IP地址',
  `login_location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '登录位置',
  `request_os` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作系统',
  `request_browser` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浏览器',
  `response_code` int NOT NULL COMMENT '响应状态码',
  `response_json` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '响应体',
  `process_time` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处理时间',
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `uuid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'UUID全局唯一标识',
  `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用(0:启用 1:禁用)',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注/描述',
  `created_time` datetime NOT NULL COMMENT '创建时间',
  `updated_time` datetime NOT NULL COMMENT '更新时间',
  `created_id` int NULL DEFAULT NULL COMMENT '创建人ID',
  `updated_id` int NULL DEFAULT NULL COMMENT '更新人ID',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uuid`(`uuid` ASC) USING BTREE,
  INDEX `ix_sys_log_updated_id`(`updated_id` ASC) USING BTREE,
  INDEX `ix_sys_log_created_id`(`created_id` ASC) USING BTREE,
  CONSTRAINT `sys_log_ibfk_1` FOREIGN KEY (`created_id`) REFERENCES `sys_user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `sys_log_ibfk_2` FOREIGN KEY (`updated_id`) REFERENCES `sys_user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统日志表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_notice (依赖 sys_user)
-- ----------------------------
DROP TABLE IF EXISTS `sys_notice`;
CREATE TABLE `sys_notice`  (
  `notice_title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '公告标题',
  `notice_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '公告类型(1通知 2公告)',
  `notice_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '公告内容',
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `uuid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'UUID全局唯一标识',
  `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用(0:启用 1:禁用)',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注/描述',
  `created_time` datetime NOT NULL COMMENT '创建时间',
  `updated_time` datetime NOT NULL COMMENT '更新时间',
  `created_id` int NULL DEFAULT NULL COMMENT '创建人ID',
  `updated_id` int NULL DEFAULT NULL COMMENT '更新人ID',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uuid`(`uuid` ASC) USING BTREE,
  INDEX `ix_sys_notice_created_id`(`created_id` ASC) USING BTREE,
  INDEX `ix_sys_notice_updated_id`(`updated_id` ASC) USING BTREE,
  CONSTRAINT `sys_notice_ibfk_1` FOREIGN KEY (`created_id`) REFERENCES `sys_user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `sys_notice_ibfk_2` FOREIGN KEY (`updated_id`) REFERENCES `sys_user` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '通知公告表' ROW_FORMAT = Dynamic;


-- ----------------------------
-- Table structure for sys_param
-- ----------------------------
DROP TABLE IF EXISTS `sys_param`;
CREATE TABLE `sys_param`  (
  `config_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '参数名称',
  `config_key` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '参数键名',
  `config_value` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '参数键值',
  `config_type` tinyint(1) NULL DEFAULT NULL COMMENT '系统内置(True:是 False:否)',
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `uuid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'UUID全局唯一标识',
  `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否启用(0:启用 1:禁用)',
  `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '备注/描述',
  `created_time` datetime NOT NULL COMMENT '创建时间',
  `updated_time` datetime NOT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE INDEX `uuid`(`uuid` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统参数表' ROW_FORMAT = Dynamic;

INSERT INTO `sys_param` VALUES ('网站名称', 'sys_web_title', 'FastApiAdmin', 1, 1, '14d996d0-ded7-42ea-89d1-e8770caae2b5', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_param` VALUES ('网站描述', 'sys_web_description', 'FastApiAdmin 是完全开源的权限管理系统', 1, 2, '8363038e-a8a4-4803-9ad4-380dd733d3c3', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_param` VALUES ('网页图标', 'sys_web_favicon', 'https://service.fastapiadmin.com/api/v1/static/image/favicon.png', 1, 3, '40dc6446-e92f-4bee-bc04-cd01251ba0eb', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_param` VALUES ('网站Logo', 'sys_web_logo', 'https://service.fastapiadmin.com/api/v1/static/image/logo.png', 1, 4, 'a3864c5f-02a5-41bb-ac04-1853ea34a70d', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_param` VALUES ('登录背景', 'sys_login_background', 'https://service.fastapiadmin.com/api/v1/static/image/background.svg', 1, 5, '380ff2ae-d5c7-433d-8eb0-c634ed9ffa7c', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_param` VALUES ('版权信息', 'sys_web_copyright', 'Copyright © 2025-2026 service.fastapiadmin.com 版权所有', 1, 6, 'f71265be-ec3b-49f1-82d2-6bba844015d2', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_param` VALUES ('备案信息', 'sys_keep_record', '陕ICP备2025069493号-1', 1, 7, 'fe2c96c6-4eb0-4bf6-b576-e7bc6d7aed92', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_param` VALUES ('帮助文档', 'sys_help_doc', 'https://service.fastapiadmin.com', 1, 8, '5454a57b-a6e2-4153-b1ca-552cfce7364f', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_param` VALUES ('隐私政策', 'sys_web_privacy', 'https://github.com/1014TaoTao/FastapiAdmin/blob/master/LICENSE', 1, 9, '0ab4c875-a36f-4669-8d07-4698c4a243e8', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_param` VALUES ('用户协议', 'sys_web_clause', 'https://github.com/1014TaoTao/FastapiAdmin/blob/master/LICENSE', 1, 10, 'b38149c3-b406-4d19-9c25-e9830df3fbf8', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_param` VALUES ('源码代码', 'sys_git_code', 'https://github.com/1014TaoTao/FastapiAdmin.git', 1, 11, '901c55b0-3cb4-4ea0-b34c-8624e4222152', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_param` VALUES ('项目版本', 'sys_web_version', '2.0.0', 1, 12, 'd5f8a22b-2def-419f-a76c-6d7fad71c286', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_param` VALUES ('演示模式启用', 'demo_enable', 'false', 1, 13, 'a552d4a1-3d36-48f4-af39-b5c17e228f3b', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_param` VALUES ('演示访问IP白名单', 'ip_white_list', '[\"127.0.0.1\"]', 1, 14, 'f9bbd7ba-7c4d-49da-bb39-3b34484ed9ed', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_param` VALUES ('接口白名单', 'white_api_list_path', '[\"/api/v1/system/auth/login\", \"/api/v1/system/auth/token/refresh\", \"/api/v1/system/auth/captcha/get\", \"/api/v1/system/auth/logout\", \"/api/v1/system/config/info\", \"/api/v1/system/user/current/info\", \"/api/v1/system/notice/available\"]', 1, 15, 'cdeef9ea-5a49-442b-902d-bc43ee01b5d9', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_param` VALUES ('访问IP黑名单', 'ip_black_list', '[]', 1, 16, 'e009e015-11c2-47cc-a9c9-d6b2cbc7d2f9', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');


-- ============================================
-- 第四部分：关联表
-- ============================================

-- ----------------------------
-- Table structure for sys_role_depts (角色部门关联表)
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_depts`;
CREATE TABLE `sys_role_depts`  (
  `role_id` int NOT NULL COMMENT '角色ID',
  `dept_id` int NOT NULL COMMENT '部门ID',
  PRIMARY KEY (`role_id`, `dept_id`) USING BTREE,
  INDEX `dept_id`(`dept_id` ASC) USING BTREE,
  CONSTRAINT `sys_role_depts_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `sys_role` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `sys_role_depts_ibfk_2` FOREIGN KEY (`dept_id`) REFERENCES `sys_dept` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色部门关联表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_role_menus (角色菜单关联表)
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_menus`;
CREATE TABLE `sys_role_menus`  (
  `role_id` int NOT NULL COMMENT '角色ID',
  `menu_id` int NOT NULL COMMENT '菜单ID',
  PRIMARY KEY (`role_id`, `menu_id`) USING BTREE,
  INDEX `menu_id`(`menu_id` ASC) USING BTREE,
  CONSTRAINT `sys_role_menus_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `sys_role` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `sys_role_menus_ibfk_2` FOREIGN KEY (`menu_id`) REFERENCES `sys_menu` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色菜单关联表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_user_positions (用户岗位关联表)
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_positions`;
CREATE TABLE `sys_user_positions`  (
  `user_id` int NOT NULL COMMENT '用户ID',
  `position_id` int NOT NULL COMMENT '岗位ID',
  PRIMARY KEY (`user_id`, `position_id`) USING BTREE,
  INDEX `position_id`(`position_id` ASC) USING BTREE,
  CONSTRAINT `sys_user_positions_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `sys_user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `sys_user_positions_ibfk_2` FOREIGN KEY (`position_id`) REFERENCES `sys_position` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户岗位关联表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_user_roles (用户角色关联表)
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_roles`;
CREATE TABLE `sys_user_roles`  (
  `user_id` int NOT NULL COMMENT '用户ID',
  `role_id` int NOT NULL COMMENT '角色ID',
  PRIMARY KEY (`user_id`, `role_id`) USING BTREE,
  INDEX `role_id`(`role_id` ASC) USING BTREE,
  CONSTRAINT `sys_user_roles_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `sys_user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `sys_user_roles_ibfk_2` FOREIGN KEY (`role_id`) REFERENCES `sys_role` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户角色关联表' ROW_FORMAT = Dynamic;

INSERT INTO `sys_user_roles` VALUES (1, 1);


-- ============================================
-- 第五部分：菜单数据（sys_menu INSERT）
-- ============================================

-- 一级菜单（目录）
INSERT INTO `sys_menu` VALUES ('仪表盘', 1, 1, '', 'client', 'Dashboard', '/dashboard', NULL, '/dashboard/workplace', 0, 1, 1, '仪表盘', 'null', 0, NULL, 1, 'f18667e5-2725-4cce-938b-8d62db314c09', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('系统管理', 1, 2, NULL, 'system', 'System', '/system', NULL, '/system/menu', 0, 1, 0, '系统管理', 'null', 0, NULL, 2, '85f17191-31e2-42d5-b0f4-3f6079a442ed', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('应用管理', 1, 3, NULL, 'el-icon-ShoppingBag', 'Application', '/application', NULL, '/application/myapp', 0, 0, 0, '应用管理', 'null', 0, NULL, 3, '48621d8c-860c-433b-8db8-9073d202363d', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('监控管理', 1, 4, NULL, 'monitor', 'Monitor', '/monitor', NULL, '/monitor/online', 0, 0, 0, '监控管理', 'null', 0, NULL, 4, 'ca09c40f-08f6-4afa-9c1a-2f02d5528d03', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('代码管理', 1, 5, NULL, 'code', 'Generator', '/generator', NULL, '/generator/gencode', 0, 0, 0, '代码管理', 'null', 0, NULL, 5, '9db80cc6-1c97-445d-8a0a-27e045b41ea6', '0', '代码管理', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('接口管理', 1, 6, NULL, 'document', 'Common', '/common', NULL, '/common/docs', 0, 0, 0, '接口管理', 'null', 0, NULL, 6, '806ec171-fe4f-4fbc-9342-02a0b0497a3f', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('模块管理', 1, 7, NULL, 'menu', 'Gencode', '/gencode', NULL, '/gencode/demo', 0, 0, 0, '模块管理', 'null', 0, NULL, 7, '0c9ceb44-f3cc-4b45-84e1-f8737e4073ba', '0', '模块管理', '2025-12-16 10:13:01', '2025-12-16 10:13:01');

-- 二级菜单
INSERT INTO `sys_menu` VALUES ('工作台', 2, 1, 'dashboard:workplace:query', 'el-icon-PieChart', 'Workplace', '/dashboard/workplace', 'dashboard/workplace', NULL, 0, 1, 0, '工作台', 'null', 0, 1, 8, 'c26ba964-75e6-4cf8-b2a8-6e7a7560c0fd', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('菜单管理', 2, 1, 'module_system:menu:query', 'menu', 'Menu', '/system/menu', 'module_system/menu/index', NULL, 0, 1, 0, '菜单管理', 'null', 0, 2, 9, 'e1dc2ac9-38b2-4d1d-876b-a607a611895c', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('部门管理', 2, 2, 'module_system:dept:query', 'tree', 'Dept', '/system/dept', 'module_system/dept/index', NULL, 0, 1, 0, '部门管理', 'null', 0, 2, 10, '78ee460e-f62d-4a7c-9a72-bd9cb087dbca', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('岗位管理', 2, 3, 'module_system:position:query', 'el-icon-Coordinate', 'Position', '/system/position', 'module_system/position/index', NULL, 0, 1, 0, '岗位管理', 'null', 0, 2, 11, '6c632522-9743-4623-9f1a-3522c3343348', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('角色管理', 2, 4, 'module_system:role:query', 'role', 'Role', '/system/role', 'module_system/role/index', NULL, 0, 1, 0, '角色管理', 'null', 0, 2, 12, 'e5b2d911-16f0-4bae-81f3-a85514a45a68', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('用户管理', 2, 5, 'module_system:user:query', 'el-icon-User', 'User', '/system/user', 'module_system/user/index', NULL, 0, 1, 0, '用户管理', 'null', 0, 2, 13, 'c961a004-229a-44b2-8dc7-b02cc4c3375b', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('日志管理', 2, 6, 'module_system:log:query', 'el-icon-Aim', 'Log', '/system/log', 'module_system/log/index', NULL, 0, 1, 0, '日志管理', 'null', 0, 2, 14, 'a6a1eaab-cf39-4876-98ea-328e86da26cc', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('公告管理', 2, 7, 'module_system:notice:query', 'bell', 'Notice', '/system/notice', 'module_system/notice/index', NULL, 0, 1, 0, '公告管理', 'null', 0, 2, 15, '0174175a-28ce-496a-9ce3-e766e4783989', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('参数管理', 2, 8, 'module_system:param:query', 'setting', 'Params', '/system/param', 'module_system/param/index', NULL, 0, 1, 0, '参数管理', 'null', 0, 2, 16, '1f10b6a1-35d5-4758-9d0d-600761fe662e', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('字典管理', 2, 9, 'module_system:dict_type:query', 'dict', 'Dict', '/system/dict', 'module_system/dict/index', NULL, 0, 1, 0, '字典管理', 'null', 0, 2, 17, '00db06a3-db82-4f5a-a800-8055ebfd3891', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('我的应用', 2, 1, 'module_application:myapp:query', 'el-icon-ShoppingCartFull', 'MYAPP', '/application/myapp', 'module_application/myapp/index', NULL, 0, 1, 0, '我的应用', 'null', 0, 3, 18, 'bbc54108-5dd5-48f9-b84a-805d48b23011', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('任务管理', 2, 2, 'module_application:job:query', 'el-icon-DataLine', 'Job', '/application/job', 'module_application/job/index', NULL, 0, 1, 0, '任务管理', 'null', 0, 3, 19, 'e88de2d3-16b7-4f79-9d3d-ca2cc1bccce7', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('AI智能助手', 2, 3, 'module_application:ai:chat', 'el-icon-ToiletPaper', 'AI', '/application/ai', 'module_application/ai/index', NULL, 0, 1, 0, 'AI智能助手', 'null', 0, 3, 20, '3006f89a-ef7b-4e6d-bd7c-ba1985b228f7', '0', 'AI智能助手', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('流程管理', 2, 4, 'module_application:workflow:query', 'el-icon-ShoppingBag', 'Workflow', '/application/workflow', 'module_application/workflow/index', NULL, 0, 1, 0, '我的流程', 'null', 0, 3, 21, '1b3b00a8-55ce-4d56-8d9c-acc7e8376b3a', '0', '我的流程', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('在线用户', 2, 1, 'module_monitor:online:query', 'el-icon-Headset', 'MonitorOnline', '/monitor/online', 'module_monitor/online/index', NULL, 0, 0, 0, '在线用户', 'null', 0, 4, 22, '50834864-2ad2-44db-948b-3d5cb63890d0', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('服务器监控', 2, 2, 'module_monitor:server:query', 'el-icon-Odometer', 'MonitorServer', '/monitor/server', 'module_monitor/server/index', NULL, 0, 0, 0, '服务器监控', 'null', 0, 4, 23, 'f3c978f3-2171-4e9f-a62c-8481123baf70', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('缓存监控', 2, 3, 'module_monitor:cache:query', 'el-icon-Stopwatch', 'MonitorCache', '/monitor/cache', 'module_monitor/cache/index', NULL, 0, 0, 0, '缓存监控', 'null', 0, 4, 24, '4f5b076c-df73-4a80-ab94-83d5b9743205', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('文件管理', 2, 4, 'module_monitor:resource:query', 'el-icon-Files', 'Resource', '/monitor/resource', 'module_monitor/resource/index', NULL, 0, 1, 0, '文件管理', 'null', 0, 4, 25, '46b4fc23-2763-49a1-b16b-b93d35b88ad8', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('代码生成', 2, 1, 'module_generator:gencode:query', 'code', 'GenCode', '/generator/gencode', 'module_generator/gencode/index', NULL, 0, 1, 0, '代码生成', 'null', 0, 5, 26, 'b021828b-7a8c-49bc-a10b-be6a1787b8c2', '0', '代码生成', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('Swagger文档', 4, 1, 'module_common:docs:query', 'api', 'Docs', '/common/docs', 'module_common/docs/index', NULL, 0, 0, 0, 'Swagger文档', 'null', 0, 6, 27, 'fb5fd65e-7640-4ca0-8bf1-d2661162d757', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('Redoc文档', 4, 2, 'module_common:redoc:query', 'el-icon-Document', 'Redoc', '/common/redoc', 'module_common/redoc/index', NULL, 0, 0, 0, 'Redoc文档', 'null', 0, 6, 28, 'aeffae91-14da-42c8-9d42-c639962fb176', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('示例管理', 2, 1, 'module_gencode:demo:query', 'menu', 'Demo', '/gencode/demo', 'module_gencode/demo/index', NULL, 0, 1, 0, '示例管理', 'null', 0, 7, 29, '8b02ea2d-78d1-4375-9a0f-eeb06d685d19', '0', '示例管理', '2025-12-16 10:13:01', '2025-12-16 10:13:01');


-- 三级菜单（按钮/权限）
INSERT INTO `sys_menu` VALUES ('创建菜单', 3, 1, 'module_system:menu:create', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '创建菜单', 'null', 0, 9, 30, '97366bb7-995c-4390-b284-dd6363cb050c', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('修改菜单', 3, 2, 'module_system:menu:update', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '修改菜单', 'null', 0, 9, 31, '75fac56d-c833-4956-8534-df4039724d80', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('删除菜单', 3, 3, 'module_system:menu:delete', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '删除菜单', 'null', 0, 9, 32, '6adb4b4f-264a-41ca-b88c-1b84e932a547', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('批量修改菜单状态', 3, 4, 'module_system:menu:patch', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '批量修改菜单状态', 'null', 0, 9, 33, '9188cf63-c35d-4b9d-95bc-f580b8d7a041', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('创建部门', 3, 1, 'module_system:dept:create', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '创建部门', 'null', 0, 10, 34, 'ca185891-6812-4f95-834c-8d50de9ed71f', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('修改部门', 3, 2, 'module_system:dept:update', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '修改部门', 'null', 0, 10, 35, 'dcc43dcf-c1ec-4f0d-a042-001ffb2114de', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('删除部门', 3, 3, 'module_system:dept:delete', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '删除部门', 'null', 0, 10, 36, 'f1320c7c-2b1e-4513-97b2-b58c87f85131', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('批量修改部门状态', 3, 4, 'module_system:dept:patch', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '批量修改部门状态', 'null', 0, 10, 37, 'c3f2247e-7d17-46d1-a50c-f39d3ca7efc1', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('创建岗位', 3, 1, 'module_system:position:create', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '创建岗位', 'null', 0, 11, 38, '419ba782-b580-4548-bad1-11a8573fd337', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('修改岗位', 3, 2, 'module_system:position:update', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '修改岗位', 'null', 0, 11, 39, 'b01d00ec-6bda-4178-b1dd-171b400dc066', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('删除岗位', 3, 3, 'module_system:position:delete', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '修改岗位', 'null', 0, 11, 40, '7732d432-b122-441d-8c67-778721bd130e', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('批量修改岗位状态', 3, 4, 'module_system:position:patch', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '批量修改岗位状态', 'null', 0, 11, 41, '09def1ae-cd5b-476d-bfae-4867ce24d081', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('岗位导出', 3, 5, 'module_system:position:export', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '岗位导出', 'null', 0, 11, 42, 'd77a6004-b198-4216-926a-4de2696f6296', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('设置角色权限', 3, 8, 'module_system:role:permission', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '设置角色权限', 'null', 0, 11, 43, '2c546112-338d-4467-94bc-5b3c6ba4b2e7', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('创建角色', 3, 1, 'module_system:role:create', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '创建角色', 'null', 0, 12, 44, '1f2c01ef-75f8-4896-aba1-8edc3363f5e4', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('修改角色', 3, 2, 'module_system:role:update', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '修改角色', 'null', 0, 12, 45, '4b14850a-90e9-43f9-af0a-0f739141e23f', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('删除角色', 3, 3, 'module_system:role:delete', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '删除角色', 'null', 0, 12, 46, '4ea94139-6177-46c9-a5b8-36161a6c527b', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('批量修改角色状态', 3, 4, 'module_system:role:patch', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '批量修改角色状态', 'null', 0, 12, 47, '8dc89784-117b-46ee-8299-a4b64d03dc46', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('角色导出', 3, 6, 'module_system:role:export', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '角色导出', 'null', 0, 12, 48, '561177ab-c1c9-43d9-82c7-f5705d15ed00', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('创建用户', 3, 1, 'module_system:user:create', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '创建用户', 'null', 0, 13, 49, '8427033c-9ac2-4650-a07f-5b4c3312449b', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('修改用户', 3, 2, 'module_system:user:update', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '修改用户', 'null', 0, 13, 50, '95016c88-6f2b-4d12-b45f-da27cc72355a', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('删除用户', 3, 3, 'module_system:user:delete', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '删除用户', 'null', 0, 13, 51, 'b61cb71a-1fd3-4b9d-bae5-033fb553499e', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('批量修改用户状态', 3, 4, 'module_system:user:patch', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '批量修改用户状态', 'null', 0, 13, 52, '8e114115-f2fa-4b37-bfef-32466af12c29', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('导出用户', 3, 5, 'module_system:user:export', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '导出用户', 'null', 0, 13, 53, 'ed466808-1180-4876-8875-6edb1da3b33c', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('导入用户', 3, 6, 'module_system:user:import', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '导入用户', 'null', 0, 13, 54, 'a37dbb65-f00c-4a33-9d80-be28a1fe0432', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('日志删除', 3, 1, 'module_system:log:delete', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '日志删除', 'null', 0, 14, 55, '7874f4ac-1e1f-48e2-bc43-bd054b574fff', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('日志导出', 3, 2, 'module_system:log:export', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '日志导出', 'null', 0, 14, 56, '33544083-c730-4a2e-8e78-18946ea1c193', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('公告创建', 3, 1, 'module_system:notice:create', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '公告创建', 'null', 0, 15, 57, '9e6cb078-5fa6-4efc-9e68-b0d41b529467', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('公告修改', 3, 2, 'module_system:notice:update', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '修改用户', 'null', 0, 15, 58, '0306cf35-0af4-4223-8dd8-39c583162542', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('公告删除', 3, 3, 'module_system:notice:delete', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '公告删除', 'null', 0, 15, 59, 'c15b308e-8791-458d-abba-436fdacfc4ac', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('公告导出', 3, 4, 'module_system:notice:export', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '公告导出', 'null', 0, 15, 60, '2b580e56-e1f7-4165-bb00-004873355d74', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('公告批量修改状态', 3, 5, 'module_system:notice:patch', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '公告批量修改状态', 'null', 0, 15, 61, '8b42c344-4088-41d8-bc25-30526332c05d', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('创建参数', 3, 1, 'module_system:param:create', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '创建参数', 'null', 0, 16, 62, '8257f41f-7fd9-4473-99db-678d31688597', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('修改参数', 3, 2, 'module_system:param:update', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '修改参数', 'null', 0, 16, 63, '139f1eac-098c-4a42-a04e-e164e567c026', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('删除参数', 3, 3, 'module_system:param:delete', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '删除参数', 'null', 0, 16, 64, '4b73f092-a7b5-40ab-89fd-1a88410f10c3', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('导出参数', 3, 4, 'module_system:param:export', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '导出参数', 'null', 0, 16, 65, 'c43cc56c-6e40-4f37-a4af-f7337b8d6293', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('参数上传', 3, 5, 'module_system:param:upload', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '参数上传', 'null', 0, 16, 66, '0df625e5-7b6e-4ec3-a1f3-8743a4b01052', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('创建字典类型', 3, 1, 'module_system:dict_type:create', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '创建字典类型', 'null', 0, 17, 67, 'f2ad7d1c-3101-47c5-a899-285e49baae41', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('修改字典类型', 3, 2, 'module_system:dict_type:update', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '修改字典类型', 'null', 0, 17, 68, 'c69bcd51-9477-42d8-a4d6-2eb93d255342', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('删除字典类型', 3, 3, 'module_system:dict_type:delete', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '删除字典类型', 'null', 0, 17, 69, '120de73e-64ed-4221-8fc2-73111a553cb9', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('导出字典类型', 3, 4, 'module_system:dict_type:export', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '导出字典类型', 'null', 0, 17, 70, 'c2bed768-f311-4198-b9ff-405d390a7907', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('批量修改字典状态', 3, 5, 'module_system:dict_type:patch', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '导出字典类型', 'null', 0, 17, 71, 'b7bdda0c-a0ff-445d-a015-c65db3f0356a', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('字典数据查询', 3, 6, 'module_system:dict_data:query', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '字典数据查询', 'null', 0, 17, 72, '8fdc7d74-a263-4b81-b6f3-9bbb90ba3681', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('创建字典数据', 3, 7, 'module_system:dict_data:create', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '创建字典数据', 'null', 0, 17, 73, '682e96c5-2007-46f3-9fed-407e11f0c680', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('修改字典数据', 3, 8, 'module_system:dict_data:update', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '修改字典数据', 'null', 0, 17, 74, '6cd80fdb-5d41-4f6a-9401-04dfaaa47796', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('删除字典数据', 3, 9, 'module_system:dict_data:delete', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '删除字典数据', 'null', 0, 17, 75, 'e2b95797-5d6e-4d73-921f-3ccd6484f424', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('导出字典数据', 3, 10, 'module_system:dict_data:export', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '导出字典数据', 'null', 0, 17, 76, '2fb3229a-4a2c-451b-a7aa-1e6f74fe0a70', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('批量修改字典数据状态', 3, 11, 'module_system:dict_data:patch', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '批量修改字典数据状态', 'null', 0, 17, 77, '21495dee-f5a9-4db0-a1fc-3a3a8598e488', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');


-- 应用管理、监控管理、代码管理相关按钮
INSERT INTO `sys_menu` VALUES ('创建应用', 3, 1, 'module_application:myapp:create', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '创建应用', 'null', 0, 18, 78, '3dd3199c-c82c-4a87-aa8a-f7efa64f5d81', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('修改应用', 3, 2, 'module_application:myapp:update', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '修改应用', 'null', 0, 18, 79, 'b6d902ee-e59e-4f6d-89e0-8fb2fd7e9397', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('删除应用', 3, 3, 'module_application:myapp:delete', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '删除应用', 'null', 0, 18, 80, '6f028628-7162-4e36-9ff6-b597840379c5', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('批量修改应用状态', 3, 4, 'module_application:myapp:patch', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '批量修改应用状态', 'null', 0, 18, 81, 'ae3ed687-757f-4c9d-9656-e07a82d0b38d', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('创建任务', 3, 1, 'module_application:job:create', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '创建任务', 'null', 0, 19, 82, 'b47ec710-68cf-4a73-a1d9-130af3e14035', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('修改和操作任务', 3, 2, 'module_application:job:update', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '修改和操作任务', 'null', 0, 19, 83, '1f93d5e8-43ec-42ff-a8bf-cb3219b2be41', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('删除和清除任务', 3, 3, 'module_application:job:delete', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '删除和清除任务', 'null', 0, 19, 84, '7ea61783-d1de-4af8-a22d-6959479a3f35', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('导出定时任务', 3, 4, 'module_application:job:export', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '导出定时任务', 'null', 0, 19, 85, '9f6437b2-3ccf-441a-88f2-e896d24f9b26', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('智能对话', 3, 1, 'module_application:ai:chat', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '智能对话', 'null', 0, 20, 86, '270d22cf-0839-4bb9-8ae8-50505a3d413b', '0', '智能对话', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('在线用户强制下线', 3, 1, 'module_monitor:online:delete', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, '在线用户强制下线', 'null', 0, 22, 87, '9b573f52-8e8c-4988-80dc-ac21130f5335', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('清除缓存', 3, 1, 'module_monitor:cache:delete', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, '清除缓存', 'null', 0, 24, 88, 'f8a121b7-71fa-4c1d-87a5-09a0176e5470', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('文件上传', 3, 1, 'module_monitor:resource:upload', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '文件上传', 'null', 0, 25, 89, '43cb2476-01ed-49e8-a16b-ae950309e59a', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('文件下载', 3, 2, 'module_monitor:resource:download', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '文件下载', 'null', 0, 25, 90, 'd4d51c9f-164b-4c71-8ecb-f62a169bd933', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('文件删除', 3, 3, 'module_monitor:resource:delete', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '文件删除', 'null', 0, 25, 91, '018329c3-975e-475b-958c-1bd2d5304107', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('文件移动', 3, 4, 'module_monitor:resource:move', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '文件移动', 'null', 0, 25, 92, 'fbd2a65f-d808-4bef-8846-28ccb50abed6', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('文件复制', 3, 5, 'module_monitor:resource:copy', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '文件复制', 'null', 0, 25, 93, 'b30fe6a8-7cc9-4d68-b08f-5020762a87c6', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('文件重命名', 3, 6, 'module_monitor:resource:rename', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '文件重命名', 'null', 0, 25, 94, '8fbf6d00-36fa-43b7-b9e1-ebb14d61c70f', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('创建目录', 3, 7, 'module_monitor:resource:create_dir', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '创建目录', 'null', 0, 25, 95, 'e84b693c-8649-4921-9bb0-9304f4098bb8', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('导出文件列表', 3, 9, 'module_monitor:resource:export', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '导出文件列表', 'null', 0, 25, 96, 'ce937ebf-ea57-4e46-a072-47d172545cc4', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('查询代码生成业务表列表', 3, 1, 'module_generator:gencode:query', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '查询代码生成业务表列表', 'null', 0, 26, 97, '25da6e9b-2289-42ff-973f-419537afefd9', '0', '查询代码生成业务表列表', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('创建表结构', 3, 2, 'module_generator:gencode:create', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '创建表结构', 'null', 0, 26, 98, 'c3e033a1-7c1d-467e-92b2-751c22921ab0', '0', '创建表结构', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('编辑业务表信息', 3, 3, 'module_generator:gencode:update', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '编辑业务表信息', 'null', 0, 26, 99, '39b91d57-000a-4e1f-88a8-6ce791cdcede', '0', '编辑业务表信息', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('删除业务表信息', 3, 4, 'module_generator:gencode:delete', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '删除业务表信息', 'null', 0, 26, 100, '3c92c6b0-7646-4e6f-a0a9-0bf7374baafa', '0', '删除业务表信息', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('导入表结构', 3, 5, 'module_generator:gencode:import', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '导入表结构', 'null', 0, 26, 101, 'b51a8c84-f584-4577-8b09-785e9d85e95b', '0', '导入表结构', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('批量生成代码', 3, 6, 'module_generator:gencode:operate', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '批量生成代码', 'null', 0, 26, 102, '3efe3d31-cbde-4c9f-8c87-cff802ecd1ce', '0', '批量生成代码', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('生成代码到指定路径', 3, 7, 'module_generator:gencode:code', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '生成代码到指定路径', 'null', 0, 26, 103, '3d1eb49f-2193-43a9-80fe-ea74b849e284', '0', '生成代码到指定路径', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('查询数据库表列表', 3, 8, 'module_generator:dblist:query', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '查询数据库表列表', 'null', 0, 26, 104, '834bc814-4a17-4a27-b1a2-514489e14e23', '0', '查询数据库表列表', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('同步数据库', 3, 9, 'module_generator:db:sync', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '同步数据库', 'null', 0, 26, 105, 'c6b97a64-c05a-48f0-8a99-b5fd77a617df', '0', '同步数据库', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('创建示例', 3, 1, 'module_gencode:demo:create', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '创建示例', 'null', 0, 29, 106, '17033607-0b1b-4a16-8024-932261084f72', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('更新示例', 3, 2, 'module_gencode:demo:update', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '更新示例', 'null', 0, 29, 107, '83acded6-2074-466f-ba2e-76ed005e9e65', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('删除示例', 3, 3, 'module_gencode:demo:delete', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '删除示例', 'null', 0, 29, 108, 'dd5c4b97-f60f-4e10-8c84-07aa3f9d83b6', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('批量修改示例状态', 3, 4, 'module_gencode:demo:patch', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '批量修改示例状态', 'null', 0, 29, 109, '4ce01ef2-bbd4-4867-8abb-403702b943ea', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('导出示例', 3, 5, 'module_gencode:demo:export', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '导出示例', 'null', 0, 29, 110, '237d4153-38f5-45f7-aabb-f1bf7faddae5', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('导入示例', 3, 6, 'module_gencode:demo:import', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '导入示例', 'null', 0, 29, 111, '0259b72d-b2e4-422a-8db0-b8e1e7010cb8', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');
INSERT INTO `sys_menu` VALUES ('下载导入示例模版', 3, 7, 'module_gencode:demo:download', NULL, NULL, NULL, NULL, NULL, 0, 1, 0, '下载导入示例模版', 'null', 0, 29, 112, 'b6e447d5-1083-4b9a-a1bf-7f54348992f1', '0', '初始化数据', '2025-12-16 10:13:01', '2025-12-16 10:13:01');

-- ============================================
-- 完成
-- ============================================
SET FOREIGN_KEY_CHECKS = 1;


