/*
 Navicat Premium Data Transfer

 Source Server         : localhost-mysql
 Source Server Type    : MySQL
 Source Server Version : 50732
 Source Host           : 127.0.0.1:3306
 Source Schema         : reghao_devops_rdb

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

 Date: 20/02/2024 16:02:52
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for app_building
-- ----------------------------
DROP TABLE IF EXISTS `app_building`;
CREATE TABLE `app_building` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime(6) NOT NULL,
  `deleted` bit(1) NOT NULL,
  `update_time` datetime(6) NOT NULL,
  `build_by` varchar(255) DEFAULT NULL,
  `build_code` int(11) NOT NULL,
  `build_result` varchar(255) DEFAULT NULL,
  `build_time` datetime(6) DEFAULT NULL,
  `commit_id` varchar(255) DEFAULT NULL,
  `commit_time` datetime(6) DEFAULT NULL,
  `on_building` bit(1) NOT NULL,
  `package_path` varchar(255) DEFAULT NULL,
  `app_config_id` int(11) DEFAULT NULL,
  `build_log_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK9lsa0hnvjbqfxp33wkvwrq0ln` (`app_config_id`),
  KEY `FKmrxmqxkpatl6rgnbjjaxgce4y` (`build_log_id`),
  CONSTRAINT `FK9lsa0hnvjbqfxp33wkvwrq0ln` FOREIGN KEY (`app_config_id`) REFERENCES `app_config` (`id`),
  CONSTRAINT `FKmrxmqxkpatl6rgnbjjaxgce4y` FOREIGN KEY (`build_log_id`) REFERENCES `build_log` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of app_building
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for app_config
-- ----------------------------
DROP TABLE IF EXISTS `app_config`;
CREATE TABLE `app_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime(6) NOT NULL,
  `deleted` bit(1) NOT NULL,
  `update_time` datetime(6) NOT NULL,
  `app_id` varchar(64) NOT NULL,
  `app_name` varchar(255) NOT NULL,
  `app_repo` varchar(255) NOT NULL,
  `app_root_path` varchar(255) NOT NULL,
  `app_type` varchar(255) NOT NULL,
  `bind_ports` varchar(255) DEFAULT NULL,
  `dockerfile` text,
  `enabled` bit(1) DEFAULT NULL,
  `env` varchar(255) DEFAULT NULL,
  `health_check` varchar(255) DEFAULT NULL,
  `proj_dirname` varchar(255) DEFAULT NULL,
  `repo_branch` varchar(255) NOT NULL,
  `compiler_config_id` int(11) NOT NULL,
  `packer_config_id` int(11) NOT NULL,
  `repo_auth_config_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_boipwfawtfve9o09lnb5le29a` (`app_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of app_config
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for app_deploy_config
-- ----------------------------
DROP TABLE IF EXISTS `app_deploy_config`;
CREATE TABLE `app_deploy_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime(6) NOT NULL,
  `deleted` bit(1) NOT NULL,
  `update_time` datetime(6) NOT NULL,
  `start_home` varchar(255) DEFAULT NULL,
  `start_script` text NOT NULL,
  `unpack_script` text,
  `app_config_id` int(11) NOT NULL,
  `machine_host_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKhqgrewybinoowtbsbf63kf4pl` (`app_config_id`),
  KEY `FK7ionisohyo4pv58vwkkdugt35` (`machine_host_id`),
  CONSTRAINT `FK7ionisohyo4pv58vwkkdugt35` FOREIGN KEY (`machine_host_id`) REFERENCES `machine_host` (`id`),
  CONSTRAINT `FKhqgrewybinoowtbsbf63kf4pl` FOREIGN KEY (`app_config_id`) REFERENCES `app_config` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of app_deploy_config
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for app_deploying
-- ----------------------------
DROP TABLE IF EXISTS `app_deploying`;
CREATE TABLE `app_deploying` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime(6) NOT NULL,
  `deleted` bit(1) NOT NULL,
  `update_time` datetime(6) NOT NULL,
  `deploy_by` varchar(255) DEFAULT NULL,
  `deploy_result` varchar(255) DEFAULT NULL,
  `deploy_time` datetime(6) DEFAULT NULL,
  `deployed` bit(1) NOT NULL,
  `last_check` datetime(6) DEFAULT NULL,
  `on_deploying` bit(1) NOT NULL,
  `pid` int(11) DEFAULT NULL,
  `start_time` datetime(6) DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `app_deploy_config_id` int(11) DEFAULT NULL,
  `build_log_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK2tkqafeq2bi3gi4ec4s113hj2` (`app_deploy_config_id`),
  KEY `FK58bfgvyeuxht4nafpsvrlsor3` (`build_log_id`),
  CONSTRAINT `FK2tkqafeq2bi3gi4ec4s113hj2` FOREIGN KEY (`app_deploy_config_id`) REFERENCES `app_deploy_config` (`id`),
  CONSTRAINT `FK58bfgvyeuxht4nafpsvrlsor3` FOREIGN KEY (`build_log_id`) REFERENCES `build_log` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of app_deploying
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for build_log
-- ----------------------------
DROP TABLE IF EXISTS `build_log`;
CREATE TABLE `build_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime(6) NOT NULL,
  `deleted` bit(1) NOT NULL,
  `update_time` datetime(6) NOT NULL,
  `build_by` varchar(255) DEFAULT NULL,
  `bin_dirname` varchar(255) DEFAULT NULL,
  `compile_name` varchar(255) DEFAULT NULL,
  `compile_script` varchar(255) DEFAULT NULL,
  `compile_type` varchar(255) DEFAULT NULL,
  `dockerfile` text,
  `home_path` varchar(255) DEFAULT NULL,
  `pack_name` varchar(255) DEFAULT NULL,
  `pack_type` varchar(255) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `repo_auth_type` varchar(255) DEFAULT NULL,
  `repo_name` varchar(255) DEFAULT NULL,
  `repo_type` varchar(255) DEFAULT NULL,
  `rsa_prikey` text,
  `target_path` varchar(255) DEFAULT NULL,
  `username` varchar(255) DEFAULT NULL,
  `compile_consumed` bigint(20) DEFAULT NULL,
  `pack_consumed` bigint(20) DEFAULT NULL,
  `pull_consumed` bigint(20) DEFAULT NULL,
  `push_consumed` bigint(20) DEFAULT NULL,
  `build_log_id` varchar(255) DEFAULT NULL,
  `build_time` datetime(6) DEFAULT NULL,
  `code` int(11) DEFAULT NULL,
  `commit_id` varchar(255) DEFAULT NULL,
  `commit_time` datetime(6) DEFAULT NULL,
  `msg` text,
  `package_path` varchar(255) DEFAULT NULL,
  `app_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_clqjar7tm2irmrkf32qprfn4g` (`build_log_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of build_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for compiler_config
-- ----------------------------
DROP TABLE IF EXISTS `compiler_config`;
CREATE TABLE `compiler_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime(6) NOT NULL,
  `deleted` bit(1) NOT NULL,
  `update_time` datetime(6) NOT NULL,
  `compile_script` text,
  `home_path` varchar(255) DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `type` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_8qb44ffa5pma9xekiphefr9sp` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of compiler_config
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for deploy_log
-- ----------------------------
DROP TABLE IF EXISTS `deploy_log`;
CREATE TABLE `deploy_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime(6) NOT NULL,
  `deleted` bit(1) NOT NULL,
  `update_time` datetime(6) NOT NULL,
  `code` int(11) DEFAULT NULL,
  `deploy_by` varchar(255) DEFAULT NULL,
  `deploy_time` datetime(6) DEFAULT NULL,
  `msg` text,
  `build_log_id` int(11) DEFAULT NULL,
  `machine_host_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of deploy_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for disk_file
-- ----------------------------
DROP TABLE IF EXISTS `disk_file`;
CREATE TABLE `disk_file` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime(6) NOT NULL,
  `deleted` bit(1) NOT NULL,
  `update_time` datetime(6) NOT NULL,
  `absolute_path` varchar(255) NOT NULL,
  `content_type` varchar(255) NOT NULL,
  `filename` varchar(255) NOT NULL,
  `object_id` varchar(255) NOT NULL,
  `object_name` varchar(255) NOT NULL,
  `owner` bigint(20) DEFAULT NULL,
  `sha256sum` varchar(255) NOT NULL,
  `size` bigint(20) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_db0vg67wc61jnlo7nesm0ulbg` (`object_id`),
  UNIQUE KEY `UK_iyqdutum15wj3lc4u15dakbs2` (`object_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of disk_file
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for email_account
-- ----------------------------
DROP TABLE IF EXISTS `email_account`;
CREATE TABLE `email_account` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime(6) NOT NULL,
  `deleted` bit(1) NOT NULL,
  `update_time` datetime(6) NOT NULL,
  `password` varchar(255) DEFAULT NULL,
  `personal` varchar(255) DEFAULT NULL,
  `smtp` varchar(255) DEFAULT NULL,
  `username` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of email_account
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for machine_host
-- ----------------------------
DROP TABLE IF EXISTS `machine_host`;
CREATE TABLE `machine_host` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime(6) NOT NULL,
  `deleted` bit(1) NOT NULL,
  `update_time` datetime(6) NOT NULL,
  `env` varchar(255) NOT NULL,
  `machine_id` varchar(255) NOT NULL,
  `machine_ipv4` varchar(255) NOT NULL,
  `ipv4` varchar(255) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `port` int(11) DEFAULT NULL,
  `rsa_prikey` text,
  `username` varchar(255) DEFAULT NULL,
  `machine_info_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_lo1x88vamyh2o34gdap4aw7jr` (`machine_id`),
  KEY `FK4sue4ixq2cqjx71f6mebvww34` (`machine_info_id`),
  CONSTRAINT `FK4sue4ixq2cqjx71f6mebvww34` FOREIGN KEY (`machine_info_id`) REFERENCES `machine_info` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of machine_host
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for machine_info
-- ----------------------------
DROP TABLE IF EXISTS `machine_info`;
CREATE TABLE `machine_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime(6) NOT NULL,
  `deleted` bit(1) NOT NULL,
  `update_time` datetime(6) NOT NULL,
  `agent_version` varchar(255) NOT NULL,
  `arch` varchar(255) NOT NULL,
  `boot_time` bigint(20) NOT NULL,
  `byte_order` varchar(255) NOT NULL,
  `machine_id` varchar(255) NOT NULL,
  `machine_ipv4` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `version` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_qtvbx85mqly0sgycqp1xt208s` (`machine_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of machine_info
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for machine_info_network_infos
-- ----------------------------
DROP TABLE IF EXISTS `machine_info_network_infos`;
CREATE TABLE `machine_info_network_infos` (
  `machine_info_id` int(11) NOT NULL,
  `iface` varchar(255) DEFAULT NULL,
  `ipv4` varchar(255) DEFAULT NULL,
  `ipv6` varchar(255) DEFAULT NULL,
  `mac` varchar(255) DEFAULT NULL,
  `public_ipv4` varchar(255) DEFAULT NULL,
  KEY `FKfs6r0haxt8dx5ak8wp91pwojn` (`machine_info_id`),
  CONSTRAINT `FKfs6r0haxt8dx5ak8wp91pwojn` FOREIGN KEY (`machine_info_id`) REFERENCES `machine_info` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of machine_info_network_infos
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for notify_receiver
-- ----------------------------
DROP TABLE IF EXISTS `notify_receiver`;
CREATE TABLE `notify_receiver` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime(6) NOT NULL,
  `deleted` bit(1) NOT NULL,
  `update_time` datetime(6) NOT NULL,
  `name` varchar(255) NOT NULL,
  `type` varchar(255) DEFAULT NULL,
  `url` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_gpaf6ryyim70bbv5jfnopn2i7` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of notify_receiver
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for packer_config
-- ----------------------------
DROP TABLE IF EXISTS `packer_config`;
CREATE TABLE `packer_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime(6) NOT NULL,
  `deleted` bit(1) NOT NULL,
  `update_time` datetime(6) NOT NULL,
  `bin_dirname` varchar(255) DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `target_path` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_ilu7yfvuir3cvd8oqiemwrqh8` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of packer_config
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for repo_auth_config
-- ----------------------------
DROP TABLE IF EXISTS `repo_auth_config`;
CREATE TABLE `repo_auth_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime(6) NOT NULL,
  `deleted` bit(1) NOT NULL,
  `update_time` datetime(6) NOT NULL,
  `auth_type` varchar(255) DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `password` varchar(255) DEFAULT NULL,
  `rsa_prikey` text,
  `type` varchar(255) DEFAULT NULL,
  `username` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_cfu57vn4gixedymokbkcnjpd0` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of repo_auth_config
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime(6) DEFAULT NULL,
  `update_time` datetime(6) DEFAULT NULL,
  `icon` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `pid` int(11) DEFAULT NULL,
  `pos` int(11) DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `enabled` bit(1) DEFAULT NULL,
  `deleted` bit(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13380 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of sys_menu
-- ----------------------------
BEGIN;
INSERT INTO `sys_menu` VALUES (152, '2021-05-11 15:20:06.022212', '2023-11-04 14:29:16.758868', 'layui-icon layui-icon-home', 0, 2, '主页', 'page', '/home', b'1', b'0');
INSERT INTO `sys_menu` VALUES (153, '2021-05-11 15:20:06.023637', '2023-11-04 14:29:16.764575', 'fa fa-cog', 0, 5, '系统', 'dir', '#', b'1', b'0');
INSERT INTO `sys_menu` VALUES (154, '2021-05-11 15:20:06.040161', '2021-05-19 14:05:42.646522', 'layui-icon layui-icon-user\n', 9452, 3, '用户管理', 'page', '/rbac/user', b'1', b'0');
INSERT INTO `sys_menu` VALUES (155, '2021-05-11 15:20:06.041503', '2021-05-11 15:20:06.041529', 'layui-icon layui-icon-release\n', 9452, 2, '角色管理', 'page', '/rbac/role', b'1', b'0');
INSERT INTO `sys_menu` VALUES (156, '2021-05-11 15:20:06.042662', '2021-05-19 16:14:04.207084', 'layui-icon layui-icon-release\n', 9452, 1, '资源管理', 'page', '/rbac/menu', b'1', b'0');
INSERT INTO `sys_menu` VALUES (302, '2021-05-13 10:31:09.179446', '2023-11-04 14:29:16.765833', 'layui-icon layui-icon-app', 0, 4, '应用', 'dir', '#', b'1', b'0');
INSERT INTO `sys_menu` VALUES (303, '2021-05-13 10:34:32.400476', '2023-11-02 13:28:31.292504', 'layui-icon layui-icon-face-smile', 302, 5, '构建部署', 'page', '/app/bd/build', b'1', b'0');
INSERT INTO `sys_menu` VALUES (305, '2021-05-13 10:38:19.945521', '2023-11-02 13:28:31.304294', 'layui-icon layui-icon-set', 302, 4, '应用配置', 'page', '/app/config/app', b'1', b'0');
INSERT INTO `sys_menu` VALUES (502, '2021-05-17 18:08:58.040642', '2023-11-02 13:28:31.305271', 'layui-icon layui-icon-set', 302, 3, '构建配置', 'dir', '#', b'1', b'0');
INSERT INTO `sys_menu` VALUES (503, '2021-05-17 18:10:42.043424', '2021-05-17 18:10:42.043453', 'layui-icon layui-icon-set', 502, 1, '构建目录', 'page', '/app/config/build/dir', b'1', b'0');
INSERT INTO `sys_menu` VALUES (802, '2021-05-20 13:44:18.715247', '2021-05-20 13:44:18.715323', 'layui-icon layui-icon-set', 502, 2, '仓库认证', 'page', '/app/config/build/repoauth', b'1', b'0');
INSERT INTO `sys_menu` VALUES (803, '2021-05-20 13:44:42.119999', '2021-05-20 13:44:42.120040', 'layui-icon layui-icon-set', 502, 3, '编译脚本', 'page', '/app/config/build/compiler', b'1', b'0');
INSERT INTO `sys_menu` VALUES (804, '2021-05-20 13:45:11.729758', '2021-05-20 13:45:11.729792', 'layui-icon layui-icon-set', 502, 4, '应用打包', 'page', '/app/config/build/packer', b'1', b'0');
INSERT INTO `sys_menu` VALUES (809, '2021-05-20 13:53:46.834540', '2023-11-02 13:28:31.306284', 'layui-icon layui-icon-face-smile', 302, 7, '运行状态', 'page', '/app/stat', b'1', b'0');
INSERT INTO `sys_menu` VALUES (810, '2021-05-20 13:54:34.299197', '2023-11-04 14:29:16.766948', 'fa fa-server', 0, 3, '机器', 'dir', '#', b'1', b'0');
INSERT INTO `sys_menu` VALUES (811, '2021-05-20 13:55:24.546804', '2021-05-20 13:55:24.546861', 'fa fa-server', 810, 1, '机器节点', 'page', '/machine/host', b'1', b'0');
INSERT INTO `sys_menu` VALUES (9452, '2021-07-12 10:42:34.160548', '2023-11-07 08:46:40.839306', 'layui-icon layui-icon-face-smile', 0, 9, 'RBAC', 'dir', '#', b'1', b'0');
INSERT INTO `sys_menu` VALUES (13358, '2022-09-22 17:57:35.861167', '2022-09-22 17:57:35.861193', 'layui-icon layui-icon-face-smile', 153, 1, '系统日志', 'page', '/sys/log', b'1', b'0');
INSERT INTO `sys_menu` VALUES (13361, '2023-11-01 10:57:40.679387', '2024-02-20 15:44:02.076247', 'layui-icon layui-icon-face-smile', 13370, 1, '实时日志', 'page', '/app/log/online', b'0', b'0');
INSERT INTO `sys_menu` VALUES (13370, '2023-11-02 13:28:31.320919', '2024-02-20 15:45:01.644185', 'layui-icon layui-icon-app', 302, 8, '应用日志', 'dir', '#', b'0', b'0');
INSERT INTO `sys_menu` VALUES (13371, '2023-11-02 13:37:43.413211', '2024-02-20 15:40:52.691948', 'layui-icon layui-icon-app', 13370, 2, '历史日志', 'page', '/app/log/offline', b'0', b'0');
INSERT INTO `sys_menu` VALUES (13375, '2023-11-08 09:50:28.465738', '2024-02-20 15:45:01.661523', 'layui-icon layui-icon-app', 13370, 3, 'NginxLog', 'page', '/app/log/nginx', b'0', b'0');
INSERT INTO `sys_menu` VALUES (13376, '2024-02-01 14:26:45.382748', '2024-02-01 14:26:45.382766', 'layui-icon layui-icon-app', 153, 2, '通知配置', 'dir', '#', b'1', b'0');
INSERT INTO `sys_menu` VALUES (13377, '2024-02-01 14:27:22.721533', '2024-02-01 14:27:22.721541', 'layui-icon layui-icon-app', 13376, 1, '邮箱帐号', 'page', '/sys/notify/email', b'1', b'0');
INSERT INTO `sys_menu` VALUES (13378, '2024-02-01 14:29:58.174273', '2024-02-01 14:29:58.174282', 'layui-icon layui-icon-app', 13376, 2, '接收地址', 'page', '/sys/notify/receiver', b'1', b'0');
INSERT INTO `sys_menu` VALUES (13379, '2024-02-05 09:32:04.801615', '2024-02-05 09:32:04.801630', 'layui-icon layui-icon-app', 153, 3, '系统消息', 'page', '/sys/message', b'1', b'0');
COMMIT;

-- ----------------------------
-- Table structure for sys_message
-- ----------------------------
DROP TABLE IF EXISTS `sys_message`;
CREATE TABLE `sys_message` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime(6) NOT NULL,
  `deleted` bit(1) NOT NULL,
  `update_time` datetime(6) NOT NULL,
  `content` varchar(255) DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `unread` bit(1) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of sys_message
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime(6) NOT NULL,
  `deleted` bit(1) NOT NULL,
  `update_time` datetime(6) NOT NULL,
  `description` varchar(100) NOT NULL,
  `name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of sys_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_role` VALUES (1, '2024-02-02 13:49:38.502170', b'0', '2024-02-04 16:44:30.784181', '管理员', 'ROLE_ADMIN');
INSERT INTO `sys_role` VALUES (2, '2024-02-02 13:49:38.509850', b'0', '2024-02-04 17:11:02.609304', '普通用户', 'ROLE_USER');
INSERT INTO `sys_role` VALUES (3, '2024-02-02 13:49:38.510935', b'0', '2024-02-04 16:44:23.011963', '后端', 'ROLE_BACKEND');
INSERT INTO `sys_role` VALUES (4, '2024-02-02 13:49:38.511785', b'0', '2024-02-04 17:10:58.760930', '前端', 'ROLE_FRONTEND');
INSERT INTO `sys_role` VALUES (5, '2024-02-02 13:49:38.512684', b'0', '2024-02-04 17:10:13.288862', '测试', 'ROLE_TEST');
COMMIT;

-- ----------------------------
-- Table structure for sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_menu`;
CREATE TABLE `sys_role_menu` (
  `role_id` int(11) NOT NULL,
  `menu_id` int(11) NOT NULL,
  PRIMARY KEY (`role_id`,`menu_id`),
  KEY `FKf3mud4qoc7ayew8nml4plkevo` (`menu_id`),
  CONSTRAINT `FKf3mud4qoc7ayew8nml4plkevo` FOREIGN KEY (`menu_id`) REFERENCES `sys_menu` (`id`),
  CONSTRAINT `FKkeitxsgxwayackgqllio4ohn5` FOREIGN KEY (`role_id`) REFERENCES `sys_role` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of sys_role_menu
-- ----------------------------
BEGIN;
INSERT INTO `sys_role_menu` VALUES (1, 152);
INSERT INTO `sys_role_menu` VALUES (2, 152);
INSERT INTO `sys_role_menu` VALUES (3, 152);
INSERT INTO `sys_role_menu` VALUES (4, 152);
INSERT INTO `sys_role_menu` VALUES (5, 152);
INSERT INTO `sys_role_menu` VALUES (1, 153);
INSERT INTO `sys_role_menu` VALUES (1, 154);
INSERT INTO `sys_role_menu` VALUES (1, 155);
INSERT INTO `sys_role_menu` VALUES (1, 156);
INSERT INTO `sys_role_menu` VALUES (1, 302);
INSERT INTO `sys_role_menu` VALUES (3, 302);
INSERT INTO `sys_role_menu` VALUES (1, 303);
INSERT INTO `sys_role_menu` VALUES (3, 303);
INSERT INTO `sys_role_menu` VALUES (1, 305);
INSERT INTO `sys_role_menu` VALUES (3, 305);
INSERT INTO `sys_role_menu` VALUES (1, 502);
INSERT INTO `sys_role_menu` VALUES (1, 503);
INSERT INTO `sys_role_menu` VALUES (1, 802);
INSERT INTO `sys_role_menu` VALUES (1, 803);
INSERT INTO `sys_role_menu` VALUES (1, 804);
INSERT INTO `sys_role_menu` VALUES (1, 809);
INSERT INTO `sys_role_menu` VALUES (3, 809);
INSERT INTO `sys_role_menu` VALUES (1, 810);
INSERT INTO `sys_role_menu` VALUES (1, 811);
INSERT INTO `sys_role_menu` VALUES (1, 9452);
INSERT INTO `sys_role_menu` VALUES (1, 13358);
INSERT INTO `sys_role_menu` VALUES (1, 13361);
INSERT INTO `sys_role_menu` VALUES (1, 13370);
INSERT INTO `sys_role_menu` VALUES (1, 13371);
INSERT INTO `sys_role_menu` VALUES (1, 13375);
INSERT INTO `sys_role_menu` VALUES (1, 13376);
INSERT INTO `sys_role_menu` VALUES (1, 13377);
INSERT INTO `sys_role_menu` VALUES (1, 13378);
INSERT INTO `sys_role_menu` VALUES (1, 13379);
COMMIT;

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime(6) DEFAULT NULL,
  `update_time` datetime(6) DEFAULT NULL,
  `avatar_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `gender` int(11) NOT NULL,
  `salt` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `username` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `deleted` bit(1) NOT NULL,
  `create_at` datetime(6) DEFAULT NULL,
  `enabled` bit(1) DEFAULT NULL,
  `encoded_password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `locked` bit(1) DEFAULT NULL,
  `mobile` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `screen_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_sb8bbouer5wak8vyiiy4pf2bx` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=411 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of sys_user
-- ----------------------------
BEGIN;
INSERT INTO `sys_user` VALUES (102, '2021-05-11 15:20:05.995018', '2024-02-19 13:18:00.319917', '/imgs/avatar.jpg', '', 1, 'n7Kqo8DNWr9pmPQozqY9c3iS/quPkJNbnld86e9CHoAizfYg8o76QLvQDQtlfCbz0Hj+BoPV60ShDEJ0A0eyNQ==', 'admin', b'0', '2021-05-11 15:20:05.995018', b'1', 'b5e57d7e11d570991623955663684841', b'0', NULL, '管理员');
COMMIT;

-- ----------------------------
-- Table structure for sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role`;
CREATE TABLE `sys_user_role` (
  `user_id` int(11) NOT NULL,
  `role` varchar(255) DEFAULT NULL,
  KEY `FK55itppkw3i07do3h7qoclqd4k` (`user_id`),
  CONSTRAINT `sys_user_role_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `sys_user` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of sys_user_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_user_role` VALUES (102, 'ROLE_ADMIN');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
