/*
 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: 19/08/2024 15:05:27
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for devops_app_building
-- ----------------------------
DROP TABLE IF EXISTS `devops_app_building`;
CREATE TABLE `devops_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 `devops_app_config` (`id`),
  CONSTRAINT `FKmrxmqxkpatl6rgnbjjaxgce4y` FOREIGN KEY (`build_log_id`) REFERENCES `devops_build_log` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=84 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of devops_app_building
-- ----------------------------
BEGIN;
INSERT INTO `devops_app_building` VALUES (39, '2024-02-04 10:17:54.530262', b'0', '2024-08-19 14:52:29.099170', '管理员', 0, '尚未构建', NULL, NULL, NULL, b'0', NULL, 56, NULL);
INSERT INTO `devops_app_building` VALUES (83, '2024-08-09 22:07:41.470267', b'0', '2024-08-19 15:00:40.397727', '管理员', 0, '尚未构建', NULL, NULL, NULL, b'0', NULL, 109, NULL);
COMMIT;

-- ----------------------------
-- Table structure for devops_app_config
-- ----------------------------
DROP TABLE IF EXISTS `devops_app_config`;
CREATE TABLE `devops_app_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime(6) 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,
  `dockerfile` text,
  `env` varchar(255) NOT NULL,
  `health_check` varchar(255) DEFAULT NULL,
  `bind_ports` varchar(255) DEFAULT NULL,
  `proj_dirname` varchar(255) NOT 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,
  `deleted` bit(1) NOT NULL,
  `enabled` bit(1) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_boipwfawtfve9o09lnb5le29a` (`app_id`),
  KEY `FKftr0xhcc9d3sqsbac521trmdp` (`compiler_config_id`),
  KEY `FK3gnvq7knghd35ur96hgsoxqsf` (`packer_config_id`),
  KEY `FKhedshpov1d589heicpdpsrssq` (`repo_auth_config_id`),
  CONSTRAINT `FK3gnvq7knghd35ur96hgsoxqsf` FOREIGN KEY (`packer_config_id`) REFERENCES `devops_packer_config` (`id`),
  CONSTRAINT `FKftr0xhcc9d3sqsbac521trmdp` FOREIGN KEY (`compiler_config_id`) REFERENCES `devops_compiler_config` (`id`),
  CONSTRAINT `FKhedshpov1d589heicpdpsrssq` FOREIGN KEY (`repo_auth_config_id`) REFERENCES `devops_repo_auth_config` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of devops_app_config
-- ----------------------------
BEGIN;
INSERT INTO `devops_app_config` VALUES (56, '2022-05-10 13:56:44.647569', '2024-08-19 14:52:23.374354', 'devops-agent', 'devops-agent', 'https://git.reghao.cn/reghao/devops.git', '/agent', 'java', 'FROM adoptopenjdk/openjdk11:x86_64-debianslim-jdk-11.0.24_8-slim\r\n\r\nWORKDIR /app\r\nRUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo \'Asia/Shanghai\' >/etc/timezone\r\nCOPY bin/devops-agent.jar /app/devops-agent.jar\r\nCOPY bin/agent.json /app/agent.json\r\n\r\nENTRYPOINT [\"java\",\"-Djava.security.egd=file:/dev/./urandom\",\"-Djava.awt.headless=true\",\"-jar\",\"/app/devops-agent.jar\", \"agent.json\"]\r\n', 'test', '', '-1', 'devops', 'master', 4, 3, 7, b'0', b'1');
INSERT INTO `devops_app_config` VALUES (109, '2024-08-09 22:07:41.465720', '2024-08-19 14:52:52.897236', 'devops-mgr', 'devops-mgr', 'https://git.reghao.cn/reghao/devops.git', '/mgr', 'java', 'FROM adoptopenjdk/openjdk11:x86_64-debianslim-jdk-11.0.24_8-slim\r\n\r\nWORKDIR /app\r\nRUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo \'Asia/Shanghai\' >/etc/timezone\r\nCOPY bin/devops-mgr.jar /app/devops-mgr.jar\r\n\r\nENTRYPOINT [\"java\",\"-Djava.security.egd=file:/dev/./urandom\",\"-Djava.awt.headless=true\",\"-jar\",\"/app/devops-mgr.jar\"]\r\n', 'test', '', '4020', 'devops', 'master', 8, 3, 7, b'0', b'1');
COMMIT;

-- ----------------------------
-- Table structure for devops_app_deploy_config
-- ----------------------------
DROP TABLE IF EXISTS `devops_app_deploy_config`;
CREATE TABLE `devops_app_deploy_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime(6) NOT NULL,
  `update_time` datetime(6) NOT NULL,
  `pack_type` varchar(255) DEFAULT 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,
  `deleted` bit(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FKhqgrewybinoowtbsbf63kf4pl` (`app_config_id`),
  KEY `FK7ionisohyo4pv58vwkkdugt35` (`machine_host_id`),
  CONSTRAINT `FK7ionisohyo4pv58vwkkdugt35` FOREIGN KEY (`machine_host_id`) REFERENCES `devops_machine_host` (`id`),
  CONSTRAINT `FKhqgrewybinoowtbsbf63kf4pl` FOREIGN KEY (`app_config_id`) REFERENCES `devops_app_config` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=129 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of devops_app_deploy_config
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for devops_app_deploying
-- ----------------------------
DROP TABLE IF EXISTS `devops_app_deploying`;
CREATE TABLE `devops_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,
  `app_config_id` int(11) DEFAULT NULL,
  `build_log_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FKhh8fqycgmch1cl3sti04mlwdo` (`app_config_id`),
  KEY `FKox11fja3yxscek4b5ainltwwt` (`build_log_id`),
  CONSTRAINT `FKhh8fqycgmch1cl3sti04mlwdo` FOREIGN KEY (`app_config_id`) REFERENCES `devops_app_config` (`id`),
  CONSTRAINT `FKox11fja3yxscek4b5ainltwwt` FOREIGN KEY (`build_log_id`) REFERENCES `devops_build_log` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=73 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of devops_app_deploying
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for devops_app_deploying_nodes
-- ----------------------------
DROP TABLE IF EXISTS `devops_app_deploying_nodes`;
CREATE TABLE `devops_app_deploying_nodes` (
  `app_deploying_id` int(11) NOT NULL,
  `deploy_by` varchar(255) DEFAULT NULL,
  `deploy_config_id` int(11) 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,
  `running` bit(1) DEFAULT NULL,
  `start_time` datetime(6) DEFAULT NULL,
  KEY `FKj82tj79sbhy2k2cgfsd3htx33` (`deploy_config_id`),
  KEY `FKjpvb8eim9q7rk7vufa2sj8rod` (`app_deploying_id`),
  CONSTRAINT `FKj82tj79sbhy2k2cgfsd3htx33` FOREIGN KEY (`deploy_config_id`) REFERENCES `devops_app_deploy_config` (`id`),
  CONSTRAINT `FKjpvb8eim9q7rk7vufa2sj8rod` FOREIGN KEY (`app_deploying_id`) REFERENCES `devops_app_deploying` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of devops_app_deploying_nodes
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for devops_build_log
-- ----------------------------
DROP TABLE IF EXISTS `devops_build_log`;
CREATE TABLE `devops_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,
  `total` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_clqjar7tm2irmrkf32qprfn4g` (`build_log_id`),
  KEY `FKd0pkx9ybu30s14bi26s9vukgu` (`app_id`),
  CONSTRAINT `FKd0pkx9ybu30s14bi26s9vukgu` FOREIGN KEY (`app_id`) REFERENCES `devops_app_config` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2296 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of devops_build_log
-- ----------------------------
BEGIN;
COMMIT;

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

-- ----------------------------
-- Records of devops_compiler_config
-- ----------------------------
BEGIN;
INSERT INTO `devops_compiler_config` VALUES (1, '2021-11-11 19:47:50.583876', '2021-11-11 19:47:50.583888', '', '', 'NoneCompiler', 'none', b'0', NULL, NULL);
INSERT INTO `devops_compiler_config` VALUES (4, '2022-05-10 14:03:27.638023', '2022-05-10 16:41:37.700370', '', '/opt/env/java/maven/maven-3.6.0', 'mvn-sdk', 'maven', b'0', NULL, NULL);
INSERT INTO `devops_compiler_config` VALUES (8, '2024-08-07 10:21:21.069305', '2024-08-07 10:21:21.069340', '/opt/env/java/maven/maven-3.6.0/bin/mvn clean package -Dmaven.test.skip -Ptest', '/opt/env/java/maven/maven-3.6.0', 'mvn-test', 'shell', b'0', '/opt/env/java/maven/maven-3.6.0/bin/mvn --version', NULL);
COMMIT;

-- ----------------------------
-- Table structure for devops_deploy_log
-- ----------------------------
DROP TABLE IF EXISTS `devops_deploy_log`;
CREATE TABLE `devops_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`),
  KEY `FKhs1htbkrntf18nejml8xi0599` (`build_log_id`),
  KEY `FKirt4arjkkuy62g41fbpjwl6vn` (`machine_host_id`),
  CONSTRAINT `FKhs1htbkrntf18nejml8xi0599` FOREIGN KEY (`build_log_id`) REFERENCES `devops_build_log` (`id`),
  CONSTRAINT `FKirt4arjkkuy62g41fbpjwl6vn` FOREIGN KEY (`machine_host_id`) REFERENCES `devops_machine_host` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of devops_deploy_log
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for devops_docker_registry
-- ----------------------------
DROP TABLE IF EXISTS `devops_docker_registry`;
CREATE TABLE `devops_docker_registry` (
  `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,
  `registry_url` varchar(255) NOT NULL,
  `username` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_1ggf16akngwup3pmhq39lkmt2` (`registry_url`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of devops_docker_registry
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for devops_machine_host
-- ----------------------------
DROP TABLE IF EXISTS `devops_machine_host`;
CREATE TABLE `devops_machine_host` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime(6) NOT NULL,
  `update_time` datetime(6) NOT NULL,
  `env` varchar(255) NOT NULL,
  `machine_ipv4` varchar(255) NOT NULL,
  `deleted` bit(1) NOT NULL,
  `machine_info_id` int(11) NOT NULL,
  `machine_id` 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,
  PRIMARY KEY (`id`),
  KEY `FK4sue4ixq2cqjx71f6mebvww34` (`machine_info_id`),
  CONSTRAINT `FK4sue4ixq2cqjx71f6mebvww34` FOREIGN KEY (`machine_info_id`) REFERENCES `devops_machine_info` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of devops_machine_host
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for devops_machine_info
-- ----------------------------
DROP TABLE IF EXISTS `devops_machine_info`;
CREATE TABLE `devops_machine_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime(6) NOT NULL,
  `update_time` datetime(6) 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,
  `deleted` bit(1) NOT NULL,
  `agent_version` varchar(255) NOT NULL,
  `stat` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_qtvbx85mqly0sgycqp1xt208s` (`machine_id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of devops_machine_info
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for devops_machine_info_disks
-- ----------------------------
DROP TABLE IF EXISTS `devops_machine_info_disks`;
CREATE TABLE `devops_machine_info_disks` (
  `machine_info_id` int(11) NOT NULL,
  `avail` bigint(20) DEFAULT NULL,
  `disk_path` varchar(255) DEFAULT NULL,
  `fs_type` varchar(255) DEFAULT NULL,
  `inode_avail` bigint(20) NOT NULL,
  `inode_total` bigint(20) NOT NULL,
  `mounted_on` varchar(255) DEFAULT NULL,
  `total` bigint(20) DEFAULT NULL,
  `used` bigint(20) DEFAULT NULL,
  KEY `FKlr0bjs3f9n5kwwph2pb4ptlbt` (`machine_info_id`),
  CONSTRAINT `FKlr0bjs3f9n5kwwph2pb4ptlbt` FOREIGN KEY (`machine_info_id`) REFERENCES `devops_machine_info` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of devops_machine_info_disks
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for devops_machine_info_networks
-- ----------------------------
DROP TABLE IF EXISTS `devops_machine_info_networks`;
CREATE TABLE `devops_machine_info_networks` (
  `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 `devops_machine_info` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of devops_machine_info_networks
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for devops_packer_config
-- ----------------------------
DROP TABLE IF EXISTS `devops_packer_config`;
CREATE TABLE `devops_packer_config` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime(6) 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) NOT NULL,
  `deleted` bit(1) NOT NULL,
  `docker_registry_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_ilu7yfvuir3cvd8oqiemwrqh8` (`name`),
  KEY `FK5uom427305i040xq8g9nyxgfa` (`docker_registry_id`),
  CONSTRAINT `FK5uom427305i040xq8g9nyxgfa` FOREIGN KEY (`docker_registry_id`) REFERENCES `devops_docker_registry` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of devops_packer_config
-- ----------------------------
BEGIN;
INSERT INTO `devops_packer_config` VALUES (3, '2022-05-10 14:04:10.894245', '2023-03-14 09:45:32.973613', 'bin', 'zip_devops-jar', '/', 'zip', b'0', NULL);
COMMIT;

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

-- ----------------------------
-- Records of devops_repo_auth_config
-- ----------------------------
BEGIN;
INSERT INTO `devops_repo_auth_config` VALUES (7, '2024-08-19 14:51:54.375478', '2024-08-19 14:51:54.375541', 'none', 'git-noauth', NULL, NULL, 'git', NULL, b'0');
COMMIT;

-- ----------------------------
-- Table structure for sys_disk_file
-- ----------------------------
DROP TABLE IF EXISTS `sys_disk_file`;
CREATE TABLE `sys_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 sys_disk_file
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for sys_email_account
-- ----------------------------
DROP TABLE IF EXISTS `sys_email_account`;
CREATE TABLE `sys_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 sys_email_account
-- ----------------------------
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=13407 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of sys_menu
-- ----------------------------
BEGIN;
INSERT INTO `sys_menu` VALUES (1, '2021-07-12 10:42:34.160548', '2024-07-29 13:02:25.076349', 'layui-icon layui-icon-face-smile', 0, 6, 'RBAC', 'dir', '#', b'1', b'0');
INSERT INTO `sys_menu` VALUES (2, '2021-05-11 15:20:06.042662', '2021-05-19 16:14:04.207084', 'layui-icon layui-icon-release\n', 1, 1, '资源管理', 'page', '/rbac/menu', b'1', b'0');
INSERT INTO `sys_menu` VALUES (3, '2021-05-11 15:20:06.041503', '2021-05-11 15:20:06.041529', 'layui-icon layui-icon-release\n', 1, 2, '角色管理', 'page', '/rbac/role', b'1', b'0');
INSERT INTO `sys_menu` VALUES (4, '2021-05-11 15:20:06.040161', '2021-05-19 14:05:42.646522', 'layui-icon layui-icon-user\n', 1, 3, '用户管理', 'page', '/rbac/user', b'1', b'0');
INSERT INTO `sys_menu` VALUES (5, '2021-05-11 15:20:06.022212', '2024-07-29 13:02:25.068263', 'layui-icon layui-icon-home', 0, 1, '主页', 'page', '/home', b'1', b'0');
INSERT INTO `sys_menu` VALUES (153, '2021-05-11 15:20:06.023637', '2024-07-29 13:02:25.073805', 'fa fa-cog', 0, 5, '系统', 'dir', '#', b'1', b'0');
INSERT INTO `sys_menu` VALUES (302, '2021-05-13 10:31:09.179446', '2024-07-29 13:02:25.074811', '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, 2, '构建部署', '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, 1, '应用配置', 'page', '/app/config/app', b'1', b'0');
INSERT INTO `sys_menu` VALUES (502, '2021-05-17 18:08:58.040642', '2024-08-01 18:06:53.969779', 'layui-icon layui-icon-set', 153, 1, '日志', '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', 13406, 1, '构建目录', 'page', '/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', 13406, 2, '仓库认证', 'page', '/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', 13406, 3, '编译器', 'page', '/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', 13406, 5, '应用打包', 'page', '/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, 3, '运行状态', 'page', '/app/stat', b'1', b'0');
INSERT INTO `sys_menu` VALUES (810, '2021-05-20 13:54:34.299197', '2024-08-01 18:06:53.963390', 'fa fa-server', 0, 2, '机器', 'dir', '#', b'1', b'0');
INSERT INTO `sys_menu` VALUES (811, '2021-05-20 13:55:24.546804', '2024-08-01 18:06:53.968345', 'fa fa-server', 810, 1, '机器节点', 'page', '/machine/host', 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', 502, 2, '运行日志', 'page', '/sys/log/rt', b'1', b'0');
INSERT INTO `sys_menu` VALUES (13361, '2023-11-01 10:57:40.679387', '2024-08-01 18:06:53.971751', 'layui-icon layui-icon-face-smile', 13370, 1, '实时日志', 'page', '/app/log/online', b'1', b'0');
INSERT INTO `sys_menu` VALUES (13370, '2023-11-02 13:28:31.320919', '2024-08-01 18:06:53.970846', 'layui-icon layui-icon-app', 302, 9, '应用日志', 'dir', '#', b'1', b'0');
INSERT INTO `sys_menu` VALUES (13371, '2023-11-02 13:37:43.413211', '2024-08-01 18:06:53.972486', 'layui-icon layui-icon-app', 13370, 2, '历史日志', 'page', '/app/log/offline', b'1', b'0');
INSERT INTO `sys_menu` VALUES (13375, '2023-11-08 09:50:28.465738', '2024-08-01 18:06:53.973090', 'layui-icon layui-icon-app', 13370, 3, 'NginxLog', 'page', '/app/log/nginx', b'1', 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-08-01 09:49:02.123938', '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-08-01 11:01:27.977243', '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');
INSERT INTO `sys_menu` VALUES (13402, '2024-02-01 14:26:45.382748', '2024-02-01 14:26:45.382766', 'layui-icon layui-icon-app', 502, 1, '访问日志', 'page', '/sys/log/access', b'1', b'0');
INSERT INTO `sys_menu` VALUES (13405, '2021-05-20 13:44:18.715247', '2021-05-20 13:44:18.715323', 'layui-icon layui-icon-set', 13406, 4, 'DockerRegistry', 'page', '/build/registry', b'1', b'0');
INSERT INTO `sys_menu` VALUES (13406, '2024-07-29 13:02:25.097445', '2024-07-29 13:02:25.097454', 'layui-icon layui-icon-face-smile', 0, 3, '构建配置', 'dir', '#', 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_notify_receiver
-- ----------------------------
DROP TABLE IF EXISTS `sys_notify_receiver`;
CREATE TABLE `sys_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,
  `setdefault` bit(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_gpaf6ryyim70bbv5jfnopn2i7` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of sys_notify_receiver
-- ----------------------------
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=8 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of sys_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_role` VALUES (1, '2024-02-02 13:49:38.502170', b'0', '2024-08-07 09:13:01.417025', '管理员', 'ROLE_ADMIN');
INSERT INTO `sys_role` VALUES (2, '2024-02-02 13:49:38.510935', b'0', '2024-08-01 16:59:12.903202', 'Java 开发', 'ROLE_JAVA');
INSERT INTO `sys_role` VALUES (3, '2024-02-02 13:49:38.511785', b'0', '2024-08-01 16:59:18.096812', 'DotNet 开发', 'ROLE_DOTNET');
INSERT INTO `sys_role` VALUES (7, '2024-02-02 13:49:38.511785', b'0', '2024-08-02 08:53:33.933632', '前端开发', 'ROLE_NPM');
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, 1);
INSERT INTO `sys_role_menu` VALUES (1, 2);
INSERT INTO `sys_role_menu` VALUES (1, 3);
INSERT INTO `sys_role_menu` VALUES (1, 4);
INSERT INTO `sys_role_menu` VALUES (1, 5);
INSERT INTO `sys_role_menu` VALUES (2, 5);
INSERT INTO `sys_role_menu` VALUES (3, 5);
INSERT INTO `sys_role_menu` VALUES (4, 5);
INSERT INTO `sys_role_menu` VALUES (1, 153);
INSERT INTO `sys_role_menu` VALUES (1, 302);
INSERT INTO `sys_role_menu` VALUES (2, 302);
INSERT INTO `sys_role_menu` VALUES (3, 302);
INSERT INTO `sys_role_menu` VALUES (4, 302);
INSERT INTO `sys_role_menu` VALUES (1, 303);
INSERT INTO `sys_role_menu` VALUES (2, 303);
INSERT INTO `sys_role_menu` VALUES (3, 303);
INSERT INTO `sys_role_menu` VALUES (4, 303);
INSERT INTO `sys_role_menu` VALUES (1, 305);
INSERT INTO `sys_role_menu` VALUES (2, 305);
INSERT INTO `sys_role_menu` VALUES (3, 305);
INSERT INTO `sys_role_menu` VALUES (4, 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 (2, 809);
INSERT INTO `sys_role_menu` VALUES (3, 809);
INSERT INTO `sys_role_menu` VALUES (4, 809);
INSERT INTO `sys_role_menu` VALUES (1, 810);
INSERT INTO `sys_role_menu` VALUES (1, 811);
INSERT INTO `sys_role_menu` VALUES (1, 13358);
INSERT INTO `sys_role_menu` VALUES (1, 13361);
INSERT INTO `sys_role_menu` VALUES (4, 13361);
INSERT INTO `sys_role_menu` VALUES (1, 13370);
INSERT INTO `sys_role_menu` VALUES (4, 13370);
INSERT INTO `sys_role_menu` VALUES (1, 13371);
INSERT INTO `sys_role_menu` VALUES (4, 13371);
INSERT INTO `sys_role_menu` VALUES (1, 13375);
INSERT INTO `sys_role_menu` VALUES (4, 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);
INSERT INTO `sys_role_menu` VALUES (1, 13402);
INSERT INTO `sys_role_menu` VALUES (1, 13405);
INSERT INTO `sys_role_menu` VALUES (1, 13406);
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,
  `role_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UK_sb8bbouer5wak8vyiiy4pf2bx` (`username`),
  KEY `FK4dm5kxn3potpfgdigehw7pdyu` (`role_id`),
  CONSTRAINT `FK4dm5kxn3potpfgdigehw7pdyu` FOREIGN KEY (`role_id`) REFERENCES `sys_role` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of sys_user
-- ----------------------------
BEGIN;
INSERT INTO `sys_user` VALUES (1, '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, '管理员', 1);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
