diff --git a/deploy/docker-compose/config/settings.yml b/deploy/docker-compose/config/settings.yml new file mode 100644 index 0000000..f9152e9 --- /dev/null +++ b/deploy/docker-compose/config/settings.yml @@ -0,0 +1,114 @@ +settings: + application: + # dev test prod + mode: prod + # 服务器ip,默认使用 0.0.0.0 + host: 176.17.0.1 + # 服务名称 + name: easy-admin + # 端口号 + port: 8000 # 服务端口号 + readtimeout: 1 + writertimeout: 2 + # 数据权限功能开关 + enabledp: false + # 时区 + timezone: "Africa/Cairo" + # 区域 + local: "" + ssl: + # https domain + domain: localhost:8000 + # https enable + enable: false + # ssl key + key: '-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEAsMQENN7PiyO4mben0zAy37M9HMzOFft0LQL+7i78QMNEJgRc +CQPghxmHsuKYC48Ien3yrL2vvsc93VcsBYsgP2RcfP5Wzmn+90BFbjWA62WT0p7d +RdzTc/QFz27vxyZEuOgu2Xr0FMzD3a7EKi4QaNif8xqtws3d218QIRmM+eKFBfFl +QeeFn/Yjao3Sx95qOv6raIlfqHmBAbAozhGT7ZiUNRLoE7ZizTEqX0la9dZfEQWb +vlWXgm1wHWWLsoCM+n1s72e8Q34MSmzHcjxOcYbD9pg3NilbN4Krpqgf6wW42Gr3 +4cDQsJc7+7ndK2+T6HxGoY514/SMpOgb++qpnwIDAQABAoIBAAuH60BUV+nwiBka +9msxOzha4GiHDFs5voU11fx3+y5HA/njkeoSoyxyTrxYH2lYSMojeiz+PhSDZHaS +ZQWYOEp6WQrcVTxSL3bgmJw3svO9ehb6FF7Q03MTyZHpCjeNuFuZkH4mZlK5stM8 +vyuDOsB5f8xOLWSbpQErook45KM49tdbH0lf7C2/lH4pe1C3Tnd7wClS6S4xD9Qe +oz0x3sM7HeHtQzQiXkh/iLlzLMQp4enpgsr0U/ubRZ9hcwvF8F/XggPdHiQq9QKc +8nLBI+LpWLjnM2V8AX+H3SHyhVOKnYLJIgBKZavtdETe4YEtXbDMmsNgbeeMR2hx +JhIuI9UCgYEA76Zc8ioKazyd7RG8wQmdTHAkxkrGd6ywZa7nA8dRhr4o/bRaghYP +jcWdc81+xff8l+Up4VdPuCPMW4N8+3ccVnp++PlOPaPY9A4tPUxqhR5qDViHWCW1 ++K0ETendPdRS9yJwUMOgoSgPd7mzv5bkPH/xTmPjE8QrMKReMzar2SMCgYEAvNNX +aaHbMZTj7fJXpH+7SsFjECLWP1VXth/E9iE9qe/cGttFbfspjoIS7SbXJ2tp2zlE +ILsMXQXzWlK510Riauih75UvR+pcMv9xII5WASuYzt/HlFJx8ua1TAOcuoswkBsK +BmR4wGKg2Enb+huA0gEUzSXa+LxIpgBdm1M1u1UCgYBRS8ZMACb4qd+JBHNbqL9L +pt9SxRr+jf5pACQuC/eEFg4hwoTRjFpKZbc8CYHv9mghvwOuBchtVveEM966D3X1 +gCiCnVAFaQe4AvclzD52WhLv5BBFvsU0Tr0fES6UQurCG1SukS50fPqCSuTHIZDb +VSuuxAPMOMfOAHRUOz+gsQKBgA8zhGoAmcDYF7FkPSIFFnLiNrNp2o2mtTT4Qcb+ +zhQMN1ACLwi3m5TZa+Sjp9aIkzEO3ykzZb9nZzvyRPvLiZDJwZ+kBvZnK5z/a4AP +dWUKuXaOFWcfbAT+BcJk2A08f2BajOgO1pnGVuSSrZ7o7+n4JFCPp502qzKR/Pcw +L7cxAoGBAJLpmo6C+ipBUAUDoM4L2kJw0PL2v1omItErzYw7H+JSvda60GxiG8WB +XvBOvTc32ZWMjU88A/ssI+yZWSXMprmc2b6aH2N71M+tYCEyWGwJcFH6/TjN5/fW +im7YwEal3+NRXRdW6Gz8OjIakv0FV7MiCZEuDELAi5O6VvuvjuED +-----END RSA PRIVATE KEY-----' + # ssl pem path + pem: temp/fullchain.pem + logger: + # 日志存放路径 + path: temp/logs + # 日志输出,file:文件,default:命令行,其他:命令行 + stdout: '' #控制台日志,启用后,不输出到文件 + # 日志等级, trace, debug, info, warn, error, fatal + level: trace + # 数据库日志开关 + enableddb: false + jwt: + # token 密钥,生产环境时及的修改 + secret: easy-admin + # token 过期时间 单位:秒 + timeout: 3600 + database: + # 数据库类型 mysql, sqlite3, postgres, sqlserver + # sqlserver: sqlserver://用户名:密码@地址?database=数据库名 + driver: mysql + # 数据库连接字符串 mysql 缺省信息 charset=utf8&parseTime=True&loc=Local&timeout=1000ms + source: easyadmin:easyadmin123@tcp(176.7.0.2:3306)/easy_admin?charset=utf8&parseTime=True&loc=Local&timeout=1000ms +# databases: +# 'locaohost:8000': +# driver: mysql +# # 数据库连接字符串 mysql 缺省信息 charset=utf8&parseTime=True&loc=Local&timeout=1000ms +# source: user:password@tcp(127.0.0.1:3306)/dbname?charset=utf8&parseTime=True&loc=Local&timeout=1000ms +# registers: +# - sources: +# - user:password@tcp(127.0.0.1:3306)/dbname?charset=utf8&parseTime=True&loc=Local&timeout=1000ms + gen: + # 代码生成读取的数据库名称 + dbname: easy_admin + # 代码生成是使用前端代码存放位置,需要指定到src文件夹,相对路径 + frontpath: ../ui/src + extend: # 扩展项使用说明 + demo: + name: data + cache: + redis: + addr: 176.7.0.3:6379 + password: + db: 1 + # key存在即可 + memory: '' + queue: + memory: + poolSize: 100 + redis: + addr: 176.7.0.3:6379 + password: + db: 3 + producer: + streamMaxLength: 100 + approximateMaxLength: true + consumer: + visibilityTimeout: 60 + bufferSize: 100 + concurrency: 10 + blockingTimeout: 5 + reclaimInterval: 1 + locker: + redis: \ No newline at end of file diff --git a/deploy/docker-compose/docker-compose.yaml b/deploy/docker-compose/docker-compose.yaml new file mode 100644 index 0000000..5251637 --- /dev/null +++ b/deploy/docker-compose/docker-compose.yaml @@ -0,0 +1,66 @@ +version: "3.7" + +networks: + easy-admin-network: + ipam: + driver: default + config: + - subnet: '176.7.0.0/16' + +volumes: + mysql: + redis: + +services: + server: + image: nicesteven/easy-admin + restart: always + ports: + - '8000:8000' + depends_on: + - mysql + - redis + links: + - mysql + - redis + networks: + easy-admin-network: + ipv4_address: 176.7.0.1 + healthcheck: + test: ["CMD", "curl", "-f", "-X GET", "http://176.7.0.1:8080/api/v1/getinfo"] + interval: 1m30s + timeout: 10s + retries: 3 + start_period: 40s + command: + /easy-admin server -c=/config/settings.yml + + mysql: + image: mysql:8.0.21 + container_name: mysql + command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci + restart: always + ports: + - "13306:3306" + volumes: + - $PWD/mysql_data/:/var/lib/mysql:rw + - $PWD/mysql_init/:/docker-entrypoint-initdb.d/:rw + - $PWD/config/:/config/ + - /etc/localtime:/etc/localtime:ro + environment: + MYSQL_ALLOW_EMPTY_PASSWORD: "yes" + networks: + easy-admin-network: + ipv4_address: 176.7.0.2 + + redis: + image: redis:6.0.6 + container_name: redis + restart: always + environment: + ALLOW_ANONYMOUS_LOGIN: "yes" + volumes: + - redis:/data + networks: + easy-admin-network: + ipv4_address: 176.7.0.3 \ No newline at end of file diff --git a/deploy/docker-compose/mysql_data b/deploy/docker-compose/mysql_data new file mode 100644 index 0000000..e69de29 diff --git a/deploy/docker-compose/mysql_init/database.sql b/deploy/docker-compose/mysql_init/database.sql new file mode 100644 index 0000000..db01bc1 --- /dev/null +++ b/deploy/docker-compose/mysql_init/database.sql @@ -0,0 +1,776 @@ +-- Adminer 4.8.1 MySQL 8.0.28 dump + +SET NAMES utf8; +SET time_zone = '+00:00'; +SET foreign_key_checks = 0; +SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; + +SET NAMES utf8mb4; + +USE `easy_admin`; + +DROP TABLE IF EXISTS `sys_api`; +CREATE TABLE `sys_api` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键编码', + `handle` varchar(128) DEFAULT NULL COMMENT 'handle', + `title` varchar(128) DEFAULT NULL COMMENT '标题', + `path` varchar(128) DEFAULT NULL COMMENT '地址', + `type` varchar(16) DEFAULT NULL COMMENT '接口类型', + `action` varchar(16) DEFAULT NULL COMMENT '请求类型', + `created_at` datetime(3) DEFAULT NULL COMMENT '创建时间', + `updated_at` datetime(3) DEFAULT NULL COMMENT '最后更新时间', + `deleted_at` tinyint DEFAULT '0' COMMENT '删除状态', + `create_by` bigint DEFAULT NULL COMMENT '创建者', + `update_by` bigint DEFAULT NULL COMMENT '更新者', + PRIMARY KEY (`id`), + KEY `idx_sys_api_create_by` (`create_by`), + KEY `idx_sys_api_update_by` (`update_by`), + KEY `idx_sys_api_deleted_at` (`deleted_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +INSERT INTO `sys_api` (`id`, `handle`, `title`, `path`, `type`, `action`, `created_at`, `updated_at`, `deleted_at`, `create_by`, `update_by`) VALUES +(5, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysLoginLog.Get-fm', '登录日志通过id获取', '/api/v1/sys-login-log/:id', 'BUS', 'GET', '2021-05-13 19:59:00.728', '2021-06-17 11:37:12.331', 0, 0, 0), +(6, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysOperaLog.GetPage-fm', '操作日志列表', '/api/v1/sys-opera-log', 'BUS', 'GET', '2021-05-13 19:59:00.778', '2021-06-17 11:48:40.732', 0, 0, 0), +(7, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysOperaLog.Get-fm', '操作日志通过id获取', '/api/v1/sys-opera-log/:id', 'BUS', 'GET', '2021-05-13 19:59:00.821', '2021-06-16 21:49:48.598', 0, 0, 0), +(8, 'github.com/nicelizhi/easy-admin/common/actions.IndexAction.func1', '分类列表', '/api/v1/syscategory', 'BUS', 'GET', '2021-05-13 19:59:00.870', '2021-06-13 20:53:47.883', 0, 0, 0), +(9, 'github.com/nicelizhi/easy-admin/common/actions.ViewAction.func1', '分类通过id获取', '/api/v1/syscategory/:id', 'BUS', 'GET', '2021-05-13 19:59:00.945', '2021-06-13 20:53:47.926', 0, 0, 0), +(10, 'github.com/nicelizhi/easy-admin/common/actions.IndexAction.func1', '内容列表', '/api/v1/syscontent', 'BUS', 'GET', '2021-05-13 19:59:01.005', '2021-06-13 20:53:47.966', 0, 0, 0), +(11, 'github.com/nicelizhi/easy-admin/common/actions.ViewAction.func1', '内容通过id获取', '/api/v1/syscontent/:id', 'BUS', 'GET', '2021-05-13 19:59:01.056', '2021-06-13 20:53:48.005', 0, 0, 0), +(15, 'github.com/nicelizhi/easy-admin/common/actions.IndexAction.func1', 'job列表', '/api/v1/sysjob', 'BUS', 'GET', '2021-05-13 19:59:01.248', '2021-06-13 20:53:48.169', 0, 0, 0), +(16, 'github.com/nicelizhi/easy-admin/common/actions.ViewAction.func1', 'job通过id获取', '/api/v1/sysjob/:id', 'BUS', 'GET', '2021-05-13 19:59:01.298', '2021-06-13 20:53:48.214', 0, 0, 0), +(21, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysDictType.GetPage-fm', '字典类型列表', '/api/v1/dict/type', 'BUS', 'GET', '2021-05-13 19:59:01.525', '2021-06-17 11:48:40.732', 0, 0, 0), +(22, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysDictType.GetAll-fm', '字典类型查询【代码生成】', '/api/v1/dict/type-option-select', 'SYS', 'GET', '2021-05-13 19:59:01.582', '2021-06-13 20:53:48.388', 0, 0, 0), +(23, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysDictType.Get-fm', '字典类型通过id获取', '/api/v1/dict/type/:id', 'BUS', 'GET', '2021-05-13 19:59:01.632', '2021-06-17 11:48:40.732', 0, 0, 0), +(24, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysDictData.GetPage-fm', '字典数据列表', '/api/v1/dict/data', 'BUS', 'GET', '2021-05-13 19:59:01.684', '2021-06-17 11:48:40.732', 0, 0, 0), +(25, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysDictData.Get-fm', '字典数据通过code获取', '/api/v1/dict/data/:dictCode', 'BUS', 'GET', '2021-05-13 19:59:01.732', '2021-06-17 11:48:40.732', 0, 0, 0), +(26, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysDictData.GetSysDictDataAll-fm', '数据字典根据key获取', '/api/v1/dict-data/option-select', 'SYS', 'GET', '2021-05-13 19:59:01.832', '2021-06-17 11:48:40.732', 0, 0, 0), +(27, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysDept.GetPage-fm', '部门列表', '/api/v1/dept', 'BUS', 'GET', '2021-05-13 19:59:01.940', '2021-06-17 11:48:40.732', 0, 0, 0), +(28, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysDept.Get-fm', '部门通过id获取', '/api/v1/dept/:id', 'BUS', 'GET', '2021-05-13 19:59:02.009', '2021-06-17 11:48:40.732', 0, 0, 0), +(29, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysDept.Get2Tree-fm', '查询部门下拉树【角色权限-自定权限】', '/api/v1/deptTree', 'SYS', 'GET', '2021-05-13 19:59:02.050', '2021-06-17 11:48:40.732', 0, 0, 0), +(30, 'github.com/nicelizhi/easy-admin/app/admin/apis/tools.(*Gen).GetDBTableList-fm', '数据库表列表', '/api/v1/db/tables/page', 'SYS', 'GET', '2021-05-13 19:59:02.098', '2021-06-13 20:53:48.730', 0, 0, 0), +(31, 'github.com/nicelizhi/easy-admin/app/admin/apis/tools.(*Gen).GetDBColumnList-fm', '数据表列列表', '/api/v1/db/columns/page', 'SYS', 'GET', '2021-05-13 19:59:02.140', '2021-06-13 20:53:48.771', 0, 0, 0), +(32, 'github.com/nicelizhi/easy-admin/app/admin/apis/tools.Gen.GenCode-fm', '数据库表生成到项目', '/api/v1/gen/toproject/:tableId', 'SYS', 'GET', '2021-05-13 19:59:02.183', '2021-06-13 20:53:48.812', 0, 0, 0), +(33, 'github.com/nicelizhi/easy-admin/app/admin/apis/tools.Gen.GenMenuAndApi-fm', '数据库表生成到DB', '/api/v1/gen/todb/:tableId', 'SYS', 'GET', '2021-05-13 19:59:02.227', '2021-06-13 20:53:48.853', 0, 0, 0), +(34, 'github.com/nicelizhi/easy-admin/app/admin/apis/tools.(*SysTable).GetSysTablesTree-fm', '关系表数据【代码生成】', '/api/v1/gen/tabletree', 'SYS', 'GET', '2021-05-13 19:59:02.271', '2021-06-13 20:53:48.893', 0, 0, 0), +(35, 'github.com/nicelizhi/easy-admin/app/admin/apis/tools.Gen.Preview-fm', '生成预览通过id获取', '/api/v1/gen/preview/:tableId', 'SYS', 'GET', '2021-05-13 19:59:02.315', '2021-06-13 20:53:48.935', 0, 0, 0), +(36, 'github.com/nicelizhi/easy-admin/app/admin/apis/tools.Gen.GenApiToFile-fm', '生成api带文件', '/api/v1/gen/apitofile/:tableId', 'SYS', 'GET', '2021-05-13 19:59:02.357', '2021-06-13 20:53:48.977', 0, 0, 0), +(37, 'github.com/nicelizhi/easy-admin/app/admin/apis.System.GenerateCaptchaHandler-fm', '验证码获取', '/api/v1/getCaptcha', 'SYS', 'GET', '2021-05-13 19:59:02.405', '2021-06-13 20:53:49.020', 0, 0, 0), +(38, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysUser.GetInfo-fm', '用户信息获取', '/api/v1/getinfo', 'SYS', 'GET', '2021-05-13 19:59:02.447', '2021-06-13 20:53:49.065', 0, 0, 0), +(39, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysMenu.GetPage-fm', '菜单列表', '/api/v1/menu', 'BUS', 'GET', '2021-05-13 19:59:02.497', '2021-06-17 11:48:40.732', 0, 0, 0), +(40, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysMenu.GetMenuTreeSelect-fm', '查询菜单下拉树结构【废弃】', '/api/v1/menuTreeselect', 'SYS', 'GET', '2021-05-13 19:59:02.542', '2021-06-03 22:37:21.857', 0, 0, 0), +(41, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysMenu.Get-fm', '菜单通过id获取', '/api/v1/menu/:id', 'BUS', 'GET', '2021-05-13 19:59:02.584', '2021-06-17 11:48:40.732', 0, 0, 0), +(42, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysMenu.GetMenuRole-fm', '角色菜单【顶部左侧菜单】', '/api/v1/menurole', 'SYS', 'GET', '2021-05-13 19:59:02.630', '2021-06-13 20:53:49.574', 0, 0, 0), +(43, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysMenu.GetMenuIDS-fm', '获取角色对应的菜单id数组【废弃】', '/api/v1/menuids', 'SYS', 'GET', '2021-05-13 19:59:02.675', '2021-06-03 22:39:52.500', 0, 0, 0), +(44, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysRole.GetPage-fm', '角色列表', '/api/v1/role', 'BUS', 'GET', '2021-05-13 19:59:02.720', '2021-06-17 11:48:40.732', 0, 0, 0), +(45, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysMenu.GetMenuTreeSelect-fm', '菜单权限列表【角色配菜单使用】', '/api/v1/roleMenuTreeselect/:roleId', 'SYS', 'GET', '2021-05-13 19:59:02.762', '2021-06-17 11:48:40.732', 0, 0, 0), +(46, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysDept.GetDeptTreeRoleSelect-fm', '角色部门结构树【自定义数据权限】', '/api/v1/roleDeptTreeselect/:roleId', 'SYS', 'GET', '2021-05-13 19:59:02.809', '2021-06-17 11:48:40.732', 0, 0, 0), +(47, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysRole.Get-fm', '角色通过id获取', '/api/v1/role/:id', 'BUS', 'GET', '2021-05-13 19:59:02.850', '2021-06-17 11:48:40.732', 0, 0, 0), +(48, 'github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth.(*GinJWTMiddleware).RefreshHandler-fm', '刷新token', '/api/v1/refresh_token', 'SYS', 'GET', '2021-05-13 19:59:02.892', '2021-06-13 20:53:49.278', 0, 0, 0), +(53, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysConfig.GetPage-fm', '参数列表', '/api/v1/config', 'BUS', 'GET', '2021-05-13 19:59:03.116', '2021-06-17 11:48:40.732', 0, 0, 0), +(54, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysConfig.Get-fm', '参数通过id获取', '/api/v1/config/:id', 'BUS', 'GET', '2021-05-13 19:59:03.157', '2021-06-17 11:48:40.732', 0, 0, 0), +(55, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysConfig.GetSysConfigByKEYForService-fm', '参数通过键名搜索【基础默认配置】', '/api/v1/configKey/:configKey', 'SYS', 'GET', '2021-05-13 19:59:03.198', '2021-06-13 20:53:49.745', 0, 0, 0), +(57, 'github.com/nicelizhi/easy-admin/app/jobs/apis.SysJob.RemoveJobForService-fm', 'job移除', '/api/v1/job/remove/:id', 'BUS', 'GET', '2021-05-13 19:59:03.295', '2021-06-13 20:53:49.786', 0, 0, 0), +(58, 'github.com/nicelizhi/easy-admin/app/jobs/apis.SysJob.StartJobForService-fm', 'job启动', '/api/v1/job/start/:id', 'BUS', 'GET', '2021-05-13 19:59:03.339', '2021-06-13 20:53:49.829', 0, 0, 0), +(59, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysPost.GetPage-fm', '岗位列表', '/api/v1/post', 'BUS', 'GET', '2021-05-13 19:59:03.381', '2021-06-17 11:48:40.732', 0, 0, 0), +(60, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysPost.Get-fm', '岗位通过id获取', '/api/v1/post/:id', 'BUS', 'GET', '2021-05-13 19:59:03.433', '2021-06-17 11:48:40.732', 0, 0, 0), +(62, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysConfig.GetSysConfigBySysApp-fm', '系统前端参数', '/api/v1/app-config', 'SYS', 'GET', '2021-05-13 19:59:03.526', '2021-06-13 20:53:49.994', 0, 0, 0), +(63, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysUser.GetProfile-fm', '*用户信息获取', '/api/v1/user/profile', 'SYS', 'GET', '2021-05-13 19:59:03.567', '2021-06-13 20:53:50.038', 0, 0, 0), +(66, 'github.com/go-admin-team/go-admin-core/sdk/pkg/ws.(*Manager).WsClient-fm', '链接ws【定时任务log】', '/ws/:id/:channel', 'BUS', 'GET', '2021-05-13 19:59:03.705', '2021-06-13 20:53:50.167', 0, 0, 0), +(67, 'github.com/go-admin-team/go-admin-core/sdk/pkg/ws.(*Manager).UnWsClient-fm', '退出ws【定时任务log】', '/wslogout/:id/:channel', 'BUS', 'GET', '2021-05-13 19:59:03.756', '2021-06-13 20:53:50.209', 0, 0, 0), +(68, 'github.com/nicelizhi/easy-admin/common/middleware/handler.Ping', '*用户基本信息', '/info', 'SYS', 'GET', '2021-05-13 19:59:03.800', '2021-06-13 20:53:50.251', 0, 0, 0), +(72, 'github.com/nicelizhi/easy-admin/common/actions.CreateAction.func1', '分类创建', '/api/v1/syscategory', 'BUS', 'POST', '2021-05-13 19:59:03.982', '2021-06-13 20:53:50.336', 0, 0, 0), +(73, 'github.com/nicelizhi/easy-admin/common/actions.CreateAction.func1', '内容创建', '/api/v1/syscontent', 'BUS', 'POST', '2021-05-13 19:59:04.027', '2021-06-13 20:53:50.375', 0, 0, 0), +(76, 'github.com/nicelizhi/easy-admin/common/actions.CreateAction.func1', 'job创建', '/api/v1/sysjob', 'BUS', 'POST', '2021-05-13 19:59:04.164', '2021-06-13 20:53:50.500', 0, 0, 0), +(80, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysDictData.Insert-fm', '字典数据创建', '/api/v1/dict/data', 'BUS', 'POST', '2021-05-13 19:59:04.347', '2021-06-17 11:48:40.732', 0, 0, 0), +(81, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysDictType.Insert-fm', '字典类型创建', '/api/v1/dict/type', 'BUS', 'POST', '2021-05-13 19:59:04.391', '2021-06-17 11:48:40.732', 0, 0, 0), +(82, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysDept.Insert-fm', '部门创建', '/api/v1/dept', 'BUS', 'POST', '2021-05-13 19:59:04.435', '2021-06-17 11:48:40.732', 0, 0, 0), +(85, 'github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth.(*GinJWTMiddleware).LoginHandler-fm', '*登录', '/api/v1/login', 'SYS', 'POST', '2021-05-13 19:59:04.597', '2021-06-13 20:53:50.784', 0, 0, 0), +(86, 'github.com/nicelizhi/easy-admin/common/middleware/handler.LogOut', '*退出', '/api/v1/logout', 'SYS', 'POST', '2021-05-13 19:59:04.642', '2021-06-13 20:53:50.824', 0, 0, 0), +(87, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysConfig.Insert-fm', '参数创建', '/api/v1/config', 'BUS', 'POST', '2021-05-13 19:59:04.685', '2021-06-17 11:48:40.732', 0, 0, 0), +(88, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysMenu.Insert-fm', '菜单创建', '/api/v1/menu', 'BUS', 'POST', '2021-05-13 19:59:04.777', '2021-06-17 11:48:40.732', 0, 0, 0), +(89, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysPost.Insert-fm', '岗位创建', '/api/v1/post', 'BUS', 'POST', '2021-05-13 19:59:04.886', '2021-06-17 11:48:40.732', 0, 0, 0), +(90, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysRole.Insert-fm', '角色创建', '/api/v1/role', 'BUS', 'POST', '2021-05-13 19:59:04.975', '2021-06-17 11:48:40.732', 0, 0, 0), +(91, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysUser.InsetAvatar-fm', '*用户头像编辑', '/api/v1/user/avatar', 'SYS', 'POST', '2021-05-13 19:59:05.058', '2021-06-13 20:53:51.079', 0, 0, 0), +(92, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysApi.Update-fm', '接口编辑', '/api/v1/sys-api/:id', 'BUS', 'PUT', '2021-05-13 19:59:05.122', '2021-06-17 11:48:40.732', 0, 0, 0), +(95, 'github.com/nicelizhi/easy-admin/common/actions.UpdateAction.func1', '分类编辑', '/api/v1/syscategory/:id', 'BUS', 'PUT', '2021-05-13 19:59:05.255', '2021-06-13 20:53:51.247', 0, 0, 0), +(96, 'github.com/nicelizhi/easy-admin/common/actions.UpdateAction.func1', '内容编辑', '/api/v1/syscontent/:id', 'BUS', 'PUT', '2021-05-13 19:59:05.299', '2021-06-13 20:53:51.289', 0, 0, 0), +(97, 'github.com/nicelizhi/easy-admin/common/actions.UpdateAction.func1', 'job编辑', '/api/v1/sysjob', 'BUS', 'PUT', '2021-05-13 19:59:05.343', '2021-06-13 20:53:51.331', 0, 0, 0), +(101, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysDictData.Update-fm', '字典数据编辑', '/api/v1/dict/data/:dictCode', 'BUS', 'PUT', '2021-05-13 19:59:05.519', '2021-06-17 11:48:40.732', 0, 0, 0), +(102, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysDictType.Update-fm', '字典类型编辑', '/api/v1/dict/type/:id', 'BUS', 'PUT', '2021-05-13 19:59:05.569', '2021-06-17 11:48:40.732', 0, 0, 0), +(103, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysDept.Update-fm', '部门编辑', '/api/v1/dept/:id', 'BUS', 'PUT', '2021-05-13 19:59:05.613', '2021-06-17 11:48:40.732', 0, 0, 0), +(104, 'github.com/nicelizhi/easy-admin/app/other/apis.SysFileDir.Update-fm', '文件夹编辑', '/api/v1/file-dir/:id', 'BUS', 'PUT', '2021-05-13 19:59:05.662', '2021-06-13 20:53:51.847', 0, 0, 0), +(105, 'github.com/nicelizhi/easy-admin/app/other/apis.SysFileInfo.Update-fm', '文件编辑', '/api/v1/file-info/:id', 'BUS', 'PUT', '2021-05-13 19:59:05.709', '2021-06-13 20:53:51.892', 0, 0, 0), +(106, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysRole.Update-fm', '角色编辑', '/api/v1/role/:id', 'BUS', 'PUT', '2021-05-13 19:59:05.752', '2021-06-17 11:48:40.732', 0, 0, 0), +(107, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysRole.Update2DataScope-fm', '角色数据权限修改', '/api/v1/roledatascope', 'BUS', 'PUT', '2021-05-13 19:59:05.803', '2021-06-17 11:48:40.732', 0, 0, 0), +(108, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysConfig.Update-fm', '参数编辑', '/api/v1/config/:id', 'BUS', 'PUT', '2021-05-13 19:59:05.848', '2021-06-17 11:48:40.732', 0, 0, 0), +(109, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysMenu.Update-fm', '编辑菜单', '/api/v1/menu/:id', 'BUS', 'PUT', '2021-05-13 19:59:05.891', '2021-06-17 11:48:40.732', 0, 0, 0), +(110, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysPost.Update-fm', '岗位编辑', '/api/v1/post/:id', 'BUS', 'PUT', '2021-05-13 19:59:05.934', '2021-06-17 11:48:40.732', 0, 0, 0), +(111, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysUser.UpdatePwd-fm', '*用户修改密码', '/api/v1/user/pwd', 'SYS', 'PUT', '2021-05-13 19:59:05.987', '2021-06-13 20:53:51.724', 0, 0, 0), +(112, 'github.com/nicelizhi/easy-admin/common/actions.DeleteAction.func1', '分类删除', '/api/v1/syscategory', 'BUS', 'DELETE', '2021-05-13 19:59:06.030', '2021-06-13 20:53:52.237', 0, 0, 0), +(113, 'github.com/nicelizhi/easy-admin/common/actions.DeleteAction.func1', '内容删除', '/api/v1/syscontent', 'BUS', 'DELETE', '2021-05-13 19:59:06.076', '2021-06-13 20:53:52.278', 0, 0, 0), +(114, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysLoginLog.Delete-fm', '登录日志删除', '/api/v1/sys-login-log', 'BUS', 'DELETE', '2021-05-13 19:59:06.118', '2021-06-17 11:48:40.732', 0, 0, 0), +(115, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysOperaLog.Delete-fm', '操作日志删除', '/api/v1/sys-opera-log', 'BUS', 'DELETE', '2021-05-13 19:59:06.162', '2021-06-17 11:48:40.732', 0, 0, 0), +(116, 'github.com/nicelizhi/easy-admin/common/actions.DeleteAction.func1', 'job删除', '/api/v1/sysjob', 'BUS', 'DELETE', '2021-05-13 19:59:06.206', '2021-06-13 20:53:52.323', 0, 0, 0), +(117, 'github.com/nicelizhi/easy-admin/app/other/apis.SysChinaAreaData.Delete-fm', '行政区删除', '/api/v1/sys-area-data', 'BUS', 'DELETE', '2021-05-13 19:59:06.249', '2021-06-13 20:53:52.061', 0, 0, 0), +(120, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysDictData.Delete-fm', '字典数据删除', '/api/v1/dict/data', 'BUS', 'DELETE', '2021-05-13 19:59:06.387', '2021-06-17 11:48:40.732', 0, 0, 0), +(121, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysDictType.Delete-fm', '字典类型删除', '/api/v1/dict/type', 'BUS', 'DELETE', '2021-05-13 19:59:06.432', '2021-06-17 11:48:40.732', 0, 0, 0), +(122, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysDept.Delete-fm', '部门删除', '/api/v1/dept/:id', 'BUS', 'DELETE', '2021-05-13 19:59:06.475', '2021-06-17 11:48:40.732', 0, 0, 0), +(123, 'github.com/nicelizhi/easy-admin/app/other/apis.SysFileDir.Delete-fm', '文件夹删除', '/api/v1/file-dir/:id', 'BUS', 'DELETE', '2021-05-13 19:59:06.520', '2021-06-13 20:53:52.539', 0, 0, 0), +(124, 'github.com/nicelizhi/easy-admin/app/other/apis.SysFileInfo.Delete-fm', '文件删除', '/api/v1/file-info/:id', 'BUS', 'DELETE', '2021-05-13 19:59:06.566', '2021-06-13 20:53:52.580', 0, 0, 0), +(125, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysConfig.Delete-fm', '参数删除', '/api/v1/config', 'BUS', 'DELETE', '2021-05-13 19:59:06.612', '2021-06-17 11:48:40.732', 0, 0, 0), +(126, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysMenu.Delete-fm', '删除菜单', '/api/v1/menu', 'BUS', 'DELETE', '2021-05-13 19:59:06.654', '2021-06-17 11:48:40.732', 0, 0, 0), +(127, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysPost.Delete-fm', '岗位删除', '/api/v1/post/:id', 'BUS', 'DELETE', '2021-05-13 19:59:06.702', '2021-06-17 11:48:40.732', 0, 0, 0), +(128, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysRole.Delete-fm', '角色删除', '/api/v1/role', 'BUS', 'DELETE', '2021-05-13 19:59:06.746', '2021-06-17 11:48:40.732', 0, 0, 0), +(131, 'github.com/go-admin-team/go-admin-core/tools/transfer.Handler.func1', '系统指标', '/api/v1/metrics', 'SYS', 'GET', '2021-05-17 22:13:55.933', '2021-06-13 20:53:49.614', 0, 0, 0), +(132, 'github.com/nicelizhi/easy-admin/app/other/router.registerMonitorRouter.func1', '健康状态', '/api/v1/health', 'SYS', 'GET', '2021-05-17 22:13:56.285', '2021-06-13 20:53:49.951', 0, 0, 0), +(133, 'github.com/nicelizhi/easy-admin/app/admin/apis.HelloWorld', '项目默认接口', '/', 'SYS', 'GET', '2021-05-24 10:30:44.553', '2021-06-13 20:53:47.406', 0, 0, 0), +(134, 'github.com/nicelizhi/easy-admin/app/other/apis.ServerMonitor.ServerInfo-fm', '服务器基本状态', '/api/v1/server-monitor', 'SYS', 'GET', '2021-05-24 10:30:44.937', '2021-06-13 20:53:48.255', 0, 0, 0), +(135, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysApi.GetPage-fm', '接口列表', '/api/v1/sys-api', 'BUS', 'GET', '2021-05-24 11:37:53.303', '2021-06-17 11:48:40.732', 0, 0, 0), +(136, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysApi.Get-fm', '接口通过id获取', '/api/v1/sys-api/:id', 'BUS', 'GET', '2021-05-24 11:37:53.359', '2021-06-17 11:48:40.732', 0, 0, 0), +(137, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysLoginLog.GetPage-fm', '登录日志列表', '/api/v1/sys-login-log', 'BUS', 'GET', '2021-05-24 11:47:30.397', '2021-06-17 11:48:40.732', 0, 0, 0), +(138, 'github.com/nicelizhi/easy-admin/app/other/apis.File.UploadFile-fm', '文件上传', '/api/v1/public/uploadFile', 'SYS', 'POST', '2021-05-25 19:16:18.493', '2021-06-13 20:53:50.866', 0, 0, 0), +(139, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysConfig.Update2Set-fm', '参数信息修改【参数配置】', '/api/v1/set-config', 'BUS', 'PUT', '2021-05-27 09:45:14.853', '2021-06-17 11:48:40.732', 0, 0, 0), +(140, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysConfig.Get2Set-fm', '参数获取全部【配置使用】', '/api/v1/set-config', 'BUS', 'GET', '2021-05-27 11:54:14.384', '2021-06-17 11:48:40.732', 0, 0, 0), +(141, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysUser.GetPage-fm', '管理员列表', '/api/v1/sys-user', 'BUS', 'GET', '2021-06-13 19:24:57.111', '2021-06-17 20:31:14.318', 0, 0, 0), +(142, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysUser.Get-fm', '管理员通过id获取', '/api/v1/sys-user/:id', 'BUS', 'GET', '2021-06-13 19:24:57.188', '2021-06-17 20:31:14.318', 0, 0, 0), +(143, 'github.com/nicelizhi/easy-admin/app/admin/apis/tools.(*SysTable).GetSysTablesInfo-fm', '', '/api/v1/sys/tables/info', '', 'GET', '2021-06-13 19:24:57.437', '2021-06-13 20:53:48.047', 0, 0, 0), +(144, 'github.com/nicelizhi/easy-admin/app/admin/apis/tools.(*SysTable).GetSysTables-fm', '', '/api/v1/sys/tables/info/:tableId', '', 'GET', '2021-06-13 19:24:57.510', '2021-06-13 20:53:48.088', 0, 0, 0), +(145, 'github.com/nicelizhi/easy-admin/app/admin/apis/tools.(*SysTable).GetSysTableList-fm', '', '/api/v1/sys/tables/page', '', 'GET', '2021-06-13 19:24:57.582', '2021-06-13 20:53:48.128', 0, 0, 0), +(146, 'github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1', '', '/static/*filepath', '', 'GET', '2021-06-13 19:24:59.641', '2021-06-13 20:53:50.081', 0, 0, 0), +(147, 'github.com/swaggo/gin-swagger.CustomWrapHandler.func1', '', '/swagger/*any', '', 'GET', '2021-06-13 19:24:59.713', '2021-06-13 20:53:50.123', 0, 0, 0), +(148, 'github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1', '', '/form-generator/*filepath', '', 'GET', '2021-06-13 19:24:59.914', '2021-06-13 20:53:50.295', 0, 0, 0), +(149, 'github.com/nicelizhi/easy-admin/app/admin/apis/tools.(*SysTable).InsertSysTable-fm', '', '/api/v1/sys/tables/info', '', 'POST', '2021-06-13 19:25:00.163', '2021-06-13 20:53:50.539', 0, 0, 0), +(150, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysUser.Insert-fm', '管理员创建', '/api/v1/sys-user', 'BUS', 'POST', '2021-06-13 19:25:00.233', '2021-06-17 20:31:14.318', 0, 0, 0), +(151, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysUser.Update-fm', '管理员编辑', '/api/v1/sys-user', 'BUS', 'PUT', '2021-06-13 19:25:00.986', '2021-06-17 20:31:14.318', 0, 0, 0), +(152, 'github.com/nicelizhi/easy-admin/app/admin/apis/tools.(*SysTable).UpdateSysTable-fm', '', '/api/v1/sys/tables/info', '', 'PUT', '2021-06-13 19:25:01.149', '2021-06-13 20:53:51.375', 0, 0, 0), +(153, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysRole.Update2Status-fm', '', '/api/v1/role-status', '', 'PUT', '2021-06-13 19:25:01.446', '2021-06-13 20:53:51.636', 0, 0, 0), +(154, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysUser.ResetPwd-fm', '', '/api/v1/user/pwd/reset', '', 'PUT', '2021-06-13 19:25:01.601', '2021-06-13 20:53:51.764', 0, 0, 0), +(155, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysUser.UpdateStatus-fm', '', '/api/v1/user/status', '', 'PUT', '2021-06-13 19:25:01.671', '2021-06-13 20:53:51.806', 0, 0, 0), +(156, 'github.com/nicelizhi/easy-admin/app/admin/apis.SysUser.Delete-fm', '管理员删除', '/api/v1/sys-user', 'BUS', 'DELETE', '2021-06-13 19:25:02.043', '2021-06-17 20:31:14.318', 0, 0, 0), +(157, 'github.com/nicelizhi/easy-admin/app/admin/apis/tools.(*SysTable).DeleteSysTables-fm', '', '/api/v1/sys/tables/info/:tableId', '', 'DELETE', '2021-06-13 19:25:02.283', '2021-06-13 20:53:52.367', 0, 0, 0), +(158, 'github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1', '', '/static/*filepath', '', 'HEAD', '2021-06-13 19:25:02.734', '2021-06-13 20:53:52.791', 0, 0, 0), +(159, 'github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1', '', '/form-generator/*filepath', '', 'HEAD', '2021-06-13 19:25:02.808', '2021-06-13 20:53:52.838', 0, 0, 0); + +DROP TABLE IF EXISTS `sys_casbin_rule`; +CREATE TABLE `sys_casbin_rule` ( + `id` bigint unsigned NOT NULL AUTO_INCREMENT, + `ptype` varchar(100) DEFAULT NULL, + `v0` varchar(100) DEFAULT NULL, + `v1` varchar(100) DEFAULT NULL, + `v2` varchar(100) DEFAULT NULL, + `v3` varchar(100) DEFAULT NULL, + `v4` varchar(100) DEFAULT NULL, + `v5` varchar(100) DEFAULT NULL, + `v6` varchar(25) DEFAULT NULL, + `v7` varchar(25) DEFAULT NULL, + `p_type` varchar(100) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `idx_sys_casbin_rule` (`ptype`,`v0`,`v1`,`v2`,`v3`,`v4`,`v5`,`v6`,`v7`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + +DROP TABLE IF EXISTS `sys_columns`; +CREATE TABLE `sys_columns` ( + `column_id` bigint NOT NULL AUTO_INCREMENT, + `table_id` bigint DEFAULT NULL, + `column_name` varchar(128) DEFAULT NULL, + `column_comment` varchar(128) DEFAULT NULL, + `column_type` varchar(128) DEFAULT NULL, + `go_type` varchar(128) DEFAULT NULL, + `go_field` varchar(128) DEFAULT NULL, + `json_field` varchar(128) DEFAULT NULL, + `is_pk` varchar(4) DEFAULT NULL, + `is_increment` varchar(4) DEFAULT NULL, + `is_required` varchar(4) DEFAULT NULL, + `is_insert` varchar(4) DEFAULT NULL, + `is_edit` varchar(4) DEFAULT NULL, + `is_list` varchar(4) DEFAULT NULL, + `is_query` varchar(4) DEFAULT NULL, + `query_type` varchar(128) DEFAULT NULL, + `html_type` varchar(128) DEFAULT NULL, + `dict_type` varchar(128) DEFAULT NULL, + `sort` bigint DEFAULT NULL, + `list` varchar(1) DEFAULT NULL, + `pk` tinyint(1) DEFAULT NULL, + `required` tinyint(1) DEFAULT NULL, + `super_column` tinyint(1) DEFAULT NULL, + `usable_column` tinyint(1) DEFAULT NULL, + `increment` tinyint(1) DEFAULT NULL, + `insert` tinyint(1) DEFAULT NULL, + `edit` tinyint(1) DEFAULT NULL, + `query` tinyint(1) DEFAULT NULL, + `remark` varchar(255) DEFAULT NULL, + `fk_table_name` longtext, + `fk_table_name_class` longtext, + `fk_table_name_package` longtext, + `fk_label_id` longtext, + `fk_label_name` varchar(255) DEFAULT NULL, + `created_at` datetime(3) DEFAULT NULL COMMENT '创建时间', + `updated_at` datetime(3) DEFAULT NULL COMMENT '最后更新时间', + `deleted_at` tinyint NOT NULL DEFAULT '0' COMMENT '删除状态', + `create_by` bigint DEFAULT NULL COMMENT '创建者', + `update_by` bigint DEFAULT NULL COMMENT '更新者', + PRIMARY KEY (`column_id`), + UNIQUE KEY `column_id_table_id` (`column_id`,`table_id`), + KEY `idx_sys_columns_update_by` (`update_by`), + KEY `idx_sys_columns_deleted_at` (`deleted_at`), + KEY `idx_sys_columns_create_by` (`create_by`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + +DROP TABLE IF EXISTS `sys_config`; +CREATE TABLE `sys_config` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键编码', + `config_name` varchar(128) DEFAULT NULL COMMENT 'ConfigName', + `config_key` varchar(128) DEFAULT NULL COMMENT 'ConfigKey', + `config_value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT 'ConfigValue', + `config_type` varchar(64) DEFAULT NULL COMMENT 'ConfigType', + `is_frontend` varchar(64) DEFAULT NULL COMMENT '是否前台', + `remark` varchar(128) DEFAULT NULL COMMENT 'Remark', + `create_by` bigint DEFAULT NULL COMMENT '创建者', + `update_by` bigint DEFAULT NULL COMMENT '更新者', + `created_at` datetime(3) DEFAULT NULL COMMENT '创建时间', + `updated_at` datetime(3) DEFAULT NULL COMMENT '最后更新时间', + `deleted_at` tinyint(1) DEFAULT '0' COMMENT '删除状态', + PRIMARY KEY (`id`), + KEY `idx_sys_config_create_by` (`create_by`), + KEY `idx_sys_config_update_by` (`update_by`), + KEY `idx_sys_config_deleted_at` (`deleted_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +INSERT INTO `sys_config` (`id`, `config_name`, `config_key`, `config_value`, `config_type`, `is_frontend`, `remark`, `create_by`, `update_by`, `created_at`, `updated_at`, `deleted_at`) VALUES +(1, '皮肤样式', 'sys_index_skinName', 'skin-green', 'Y', '0', '主框架页-默认皮肤样式名称:蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow', 1, 1, '2021-05-13 19:56:37.913', '2023-11-01 17:37:12.533', 0), +(2, '初始密码', 'sys_user_initPassword', 'wgYoVaLXNGCXqcNY', 'Y', '0', '用户管理-账号初始密码:wgYoVaLXNGCXqcNY', 1, 1, '2021-05-13 19:56:37.913', '2023-10-21 21:35:53.284', 0), +(3, '侧栏主题', 'sys_index_sideTheme', 'theme-dark', 'Y', '0', '主框架页-侧边栏主题:深色主题theme-dark,浅色主题theme-light', 1, 1, '2021-05-13 19:56:37.913', '2021-05-13 19:56:37.913', 0), +(4, '系统名称', 'sys_app_name', '后台管理系统', 'Y', '1', '', 1, 0, '2021-03-17 08:52:06.067', '2023-10-21 21:34:37.282', 0), +(5, '系统logo', 'sys_app_logo', '', 'Y', '1', '', 1, 0, '2021-03-17 08:53:19.462', '2023-10-22 12:53:50.868', 0); + +DROP TABLE IF EXISTS `sys_dept`; +CREATE TABLE `sys_dept` ( + `dept_id` bigint NOT NULL AUTO_INCREMENT, + `parent_id` bigint DEFAULT NULL, + `dept_path` varchar(255) DEFAULT NULL, + `dept_name` varchar(128) DEFAULT NULL, + `sort` tinyint DEFAULT NULL, + `leader` varchar(128) DEFAULT NULL, + `phone` varchar(11) DEFAULT NULL, + `email` varchar(64) DEFAULT NULL, + `status` tinyint DEFAULT NULL, + `create_by` bigint DEFAULT NULL COMMENT '创建者', + `update_by` bigint DEFAULT NULL COMMENT '更新者', + `created_at` datetime(3) DEFAULT NULL COMMENT '创建时间', + `updated_at` datetime(3) DEFAULT NULL COMMENT '最后更新时间', + `deleted_at` tinyint NOT NULL DEFAULT '0' COMMENT '删除状态', + PRIMARY KEY (`dept_id`), + KEY `idx_sys_dept_create_by` (`create_by`), + KEY `idx_sys_dept_update_by` (`update_by`), + KEY `idx_sys_dept_deleted_at` (`deleted_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +INSERT INTO `sys_dept` (`dept_id`, `parent_id`, `dept_path`, `dept_name`, `sort`, `leader`, `phone`, `email`, `status`, `create_by`, `update_by`, `created_at`, `updated_at`, `deleted_at`) VALUES +(1, 0, '/0/1/', '上海申东', 0, '姚老师', '13524084051', 'atuo@aituo.com', 2, 1, 1, '2021-05-13 19:56:37.913', '2023-10-21 21:36:42.379', 0), +(7, 1, '/0/1/7/', '研发部', 1, 'aituo', '13782218188', 'atuo@aituo.com', 2, 1, 1, '2021-05-13 19:56:37.913', '2021-06-16 21:35:00.109', 0), +(8, 1, '/0/1/8/', '运维部', 0, 'aituo', '13782218188', 'atuo@aituo.com', 2, 1, 1, '2021-05-13 19:56:37.913', '2021-06-16 21:41:39.747', 0), +(9, 1, '/0/1/9/', '客服部', 0, 'aituo', '13782218188', 'atuo@aituo.com', 2, 1, 1, '2021-05-13 19:56:37.913', '2021-06-05 17:07:05.993', 0), +(10, 1, '/0/1/10/', '人力资源', 3, 'aituo', '13782218188', 'atuo@aituo.com', 1, 1, 1, '2021-05-13 19:56:37.913', '2021-06-05 17:07:08.503', 0), +(11, 10, '/0/1/10/11/', '财务部门', 10, 'admin', '13524084051', 'nice.lizhi@gmail.com', 2, 0, 0, '2023-10-13 20:53:10.408', '2023-10-13 20:53:10.410', 0); + +DROP TABLE IF EXISTS `sys_dict_data`; +CREATE TABLE `sys_dict_data` ( + `dict_code` bigint NOT NULL AUTO_INCREMENT, + `dict_sort` bigint DEFAULT NULL, + `dict_label` varchar(128) DEFAULT NULL, + `dict_value` varchar(255) DEFAULT NULL, + `dict_type` varchar(64) DEFAULT NULL, + `css_class` varchar(128) DEFAULT NULL, + `list_class` varchar(128) DEFAULT NULL, + `is_default` varchar(8) DEFAULT NULL, + `status` tinyint DEFAULT NULL, + `default` varchar(8) DEFAULT NULL, + `remark` varchar(255) DEFAULT NULL, + `create_by` bigint DEFAULT NULL COMMENT '创建者', + `update_by` bigint DEFAULT NULL COMMENT '更新者', + `created_at` datetime(3) DEFAULT NULL COMMENT '创建时间', + `updated_at` datetime(3) DEFAULT NULL COMMENT '最后更新时间', + `deleted_at` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除状态', + PRIMARY KEY (`dict_code`), + KEY `idx_sys_dict_data_create_by` (`create_by`), + KEY `idx_sys_dict_data_update_by` (`update_by`), + KEY `idx_sys_dict_data_deleted_at` (`deleted_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `default`, `remark`, `create_by`, `update_by`, `created_at`, `updated_at`, `deleted_at`) VALUES +(1, 0, '正常', '2', 'sys_normal_disable', '', '', '', 2, '', '系统正常', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:40.168', 0), +(2, 0, '停用', '1', 'sys_normal_disable', '', '', '', 2, '', '系统停用', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(3, 0, '男', '0', 'sys_user_sex', '', '', '', 2, '', '性别男', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(4, 0, '女', '1', 'sys_user_sex', '', '', '', 2, '', '性别女', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(5, 0, '未知', '2', 'sys_user_sex', '', '', '', 2, '', '性别未知', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(6, 0, '显示', '0', 'sys_show_hide', '', '', '', 2, '', '显示菜单', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(7, 0, '隐藏', '1', 'sys_show_hide', '', '', '', 2, '', '隐藏菜单', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(8, 0, '是', 'Y', 'sys_yes_no', '', '', '', 2, '', '系统默认是', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(9, 0, '否', 'N', 'sys_yes_no', '', '', '', 2, '', '系统默认否', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(10, 0, '正常', '2', 'sys_job_status', '', '', '', 2, '', '正常状态', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(11, 0, '停用', '1', 'sys_job_status', '', '', '', 2, '', '停用状态', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(12, 0, '默认', 'DEFAULT', 'sys_job_group', '', '', '', 2, '', '默认分组', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(13, 0, '系统', 'SYSTEM', 'sys_job_group', '', '', '', 2, '', '系统分组', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(14, 0, '通知', '1', 'sys_notice_type', '', '', '', 2, '', '通知', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(15, 0, '公告', '2', 'sys_notice_type', '', '', '', 2, '', '公告', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(16, 0, '正常', '2', 'sys_common_status', '', '', '', 2, '', '正常状态', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(17, 0, '关闭', '1', 'sys_common_status', '', '', '', 2, '', '关闭状态', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(18, 0, '新增', '1', 'sys_oper_type', '', '', '', 2, '', '新增操作', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(19, 0, '修改', '2', 'sys_oper_type', '', '', '', 2, '', '修改操作', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(20, 0, '删除', '3', 'sys_oper_type', '', '', '', 2, '', '删除操作', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(21, 0, '授权', '4', 'sys_oper_type', '', '', '', 2, '', '授权操作', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(22, 0, '导出', '5', 'sys_oper_type', '', '', '', 2, '', '导出操作', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(23, 0, '导入', '6', 'sys_oper_type', '', '', '', 2, '', '导入操作', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(24, 0, '强退', '7', 'sys_oper_type', '', '', '', 2, '', '强退操作', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(25, 0, '生成代码', '8', 'sys_oper_type', '', '', '', 2, '', '生成操作', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(26, 0, '清空数据', '9', 'sys_oper_type', '', '', '', 2, '', '清空操作', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(27, 0, '成功', '0', 'sys_notice_status', '', '', '', 2, '', '成功状态', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(28, 0, '失败', '1', 'sys_notice_status', '', '', '', 2, '', '失败状态', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(29, 0, '登录', '10', 'sys_oper_type', '', '', '', 2, '', '登录操作', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(30, 0, '退出', '11', 'sys_oper_type', '', '', '', 2, '', '', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(31, 0, '获取验证码', '12', 'sys_oper_type', '', '', '', 2, '', '获取验证码', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(32, 0, '正常', '1', 'sys_content_status', '', '', '', 1, '', '', 1, 1, '2021-05-13 19:56:40.845', '2021-05-13 19:56:40.845', 0), +(33, 1, '禁用', '2', 'sys_content_status', '', '', '', 1, '', '', 1, 1, '2021-05-13 19:56:40.845', '2021-05-13 19:56:40.845', 0), +(34, 0, 'default', '50', 'related-config-min-limit', '', '', '', 2, '', '', 0, 0, '2023-11-01 10:23:18.902', '2023-11-01 10:23:18.902', 0); + +DROP TABLE IF EXISTS `sys_dict_type`; +CREATE TABLE `sys_dict_type` ( + `dict_id` bigint NOT NULL AUTO_INCREMENT, + `dict_name` varchar(128) DEFAULT NULL, + `dict_type` varchar(128) DEFAULT NULL, + `status` tinyint DEFAULT NULL, + `remark` varchar(255) DEFAULT NULL, + `create_by` bigint DEFAULT NULL COMMENT '创建者', + `update_by` bigint DEFAULT NULL COMMENT '更新者', + `created_at` datetime(3) DEFAULT NULL COMMENT '创建时间', + `updated_at` datetime(3) DEFAULT NULL COMMENT '最后更新时间', + `deleted_at` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除状态', + PRIMARY KEY (`dict_id`), + KEY `idx_sys_dict_type_create_by` (`create_by`), + KEY `idx_sys_dict_type_update_by` (`update_by`), + KEY `idx_sys_dict_type_deleted_at` (`deleted_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +INSERT INTO `sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `remark`, `create_by`, `update_by`, `created_at`, `updated_at`, `deleted_at`) VALUES +(1, '系统开关', 'sys_normal_disable', 2, '系统开关列表', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(2, '用户性别', 'sys_user_sex', 2, '用户性别列表', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(3, '菜单状态', 'sys_show_hide', 2, '菜单状态列表', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(4, '系统是否', 'sys_yes_no', 2, '系统是否列表', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(5, '任务状态', 'sys_job_status', 2, '任务状态列表', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(6, '任务分组', 'sys_job_group', 2, '任务分组列表', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(7, '通知类型', 'sys_notice_type', 2, '通知类型列表', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(8, '系统状态', 'sys_common_status', 2, '登录状态列表', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(9, '操作类型', 'sys_oper_type', 2, '操作类型列表', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(10, '通知状态', 'sys_notice_status', 2, '通知状态列表', 1, 1, '2021-05-13 19:56:37.914', '2021-05-13 19:56:37.914', 0), +(11, '内容状态', 'sys_content_status', 2, '', 1, 1, '2021-05-13 19:56:40.813', '2021-05-13 19:56:40.813', 0); + +DROP TABLE IF EXISTS `sys_job`; +CREATE TABLE `sys_job` ( + `job_id` bigint NOT NULL AUTO_INCREMENT, + `job_name` varchar(255) DEFAULT NULL, + `job_group` varchar(255) DEFAULT NULL, + `job_type` tinyint DEFAULT NULL, + `cron_expression` varchar(255) DEFAULT NULL, + `invoke_target` varchar(255) DEFAULT NULL, + `args` varchar(255) DEFAULT NULL, + `misfire_policy` bigint DEFAULT NULL, + `concurrent` tinyint DEFAULT NULL, + `status` tinyint DEFAULT NULL, + `entry_id` smallint DEFAULT NULL, + `created_at` datetime(3) DEFAULT NULL COMMENT '创建时间', + `updated_at` datetime(3) DEFAULT NULL COMMENT '最后更新时间', + `deleted_at` tinyint NOT NULL DEFAULT '0' COMMENT '删除状态', + `create_by` bigint DEFAULT NULL COMMENT '创建者', + `update_by` bigint DEFAULT NULL COMMENT '更新者', + PRIMARY KEY (`job_id`), + KEY `idx_sys_job_deleted_at` (`deleted_at`), + KEY `idx_sys_job_create_by` (`create_by`), + KEY `idx_sys_job_update_by` (`update_by`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +INSERT INTO `sys_job` (`job_id`, `job_name`, `job_group`, `job_type`, `cron_expression`, `invoke_target`, `args`, `misfire_policy`, `concurrent`, `status`, `entry_id`, `created_at`, `updated_at`, `deleted_at`, `create_by`, `update_by`) VALUES +(1, '接口测试', 'DEFAULT', 1, '0/5 * * * * ', 'http://localhost:8000', '', 1, 1, 1, 0, '2021-05-13 19:56:37.914', '2021-06-14 20:59:55.417', 0, 1, 1), +(2, '函数测试', 'DEFAULT', 2, '0/5 * * * * ', 'ExamplesOne', '参数', 1, 1, 1, 0, '2021-05-13 19:56:37.914', '2021-05-31 23:55:37.221', 0, 1, 1); + +DROP TABLE IF EXISTS `sys_login_log`; +CREATE TABLE `sys_login_log` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键编码', + `username` varchar(128) DEFAULT NULL COMMENT '用户名', + `status` varchar(4) DEFAULT NULL COMMENT '状态', + `ipaddr` varchar(255) DEFAULT NULL COMMENT 'ip地址', + `login_location` varchar(255) DEFAULT NULL COMMENT '归属地', + `browser` varchar(255) DEFAULT NULL COMMENT '浏览器', + `os` varchar(255) DEFAULT NULL COMMENT '系统', + `platform` varchar(255) DEFAULT NULL COMMENT '固件', + `login_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '登录时间', + `remark` varchar(255) DEFAULT NULL COMMENT '备注', + `msg` varchar(255) DEFAULT NULL COMMENT '信息', + `created_at` datetime(3) DEFAULT NULL COMMENT '创建时间', + `updated_at` datetime(3) DEFAULT NULL COMMENT '最后更新时间', + `create_by` bigint DEFAULT NULL COMMENT '创建者', + `update_by` bigint DEFAULT NULL COMMENT '更新者', + PRIMARY KEY (`id`), + KEY `idx_sys_login_log_create_by` (`create_by`), + KEY `idx_sys_login_log_update_by` (`update_by`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + +DROP TABLE IF EXISTS `sys_menu`; +CREATE TABLE `sys_menu` ( + `menu_id` bigint NOT NULL AUTO_INCREMENT, + `menu_name` varchar(128) DEFAULT NULL, + `title` varchar(128) DEFAULT NULL, + `icon` varchar(128) DEFAULT NULL, + `path` varchar(128) DEFAULT NULL, + `paths` varchar(128) DEFAULT NULL, + `menu_type` varchar(1) DEFAULT NULL, + `action` varchar(16) DEFAULT NULL, + `permission` varchar(255) DEFAULT NULL, + `parent_id` smallint DEFAULT NULL, + `no_cache` tinyint(1) DEFAULT NULL, + `breadcrumb` varchar(255) DEFAULT NULL, + `component` varchar(255) DEFAULT NULL, + `sort` tinyint DEFAULT NULL, + `visible` varchar(1) DEFAULT NULL, + `is_frame` varchar(1) DEFAULT '0', + `create_by` bigint DEFAULT NULL COMMENT '创建者', + `update_by` bigint DEFAULT NULL COMMENT '更新者', + `created_at` datetime(3) DEFAULT NULL COMMENT '创建时间', + `updated_at` datetime(3) DEFAULT NULL COMMENT '最后更新时间', + `deleted_at` tinyint NOT NULL DEFAULT '0' COMMENT '删除状态', + PRIMARY KEY (`menu_id`), + KEY `idx_sys_menu_create_by` (`create_by`), + KEY `idx_sys_menu_update_by` (`update_by`), + KEY `idx_sys_menu_deleted_at` (`deleted_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `title`, `icon`, `path`, `paths`, `menu_type`, `action`, `permission`, `parent_id`, `no_cache`, `breadcrumb`, `component`, `sort`, `visible`, `is_frame`, `create_by`, `update_by`, `created_at`, `updated_at`, `deleted_at`) VALUES +(2, 'Admin', '系统管理', 'api-server', '/admin', '/0/2', 'M', '无', '', 0, 1, '', 'Layout', 10, '0', '1', 0, 1, '2021-05-20 21:58:45.679', '2023-10-07 22:06:59.442', 0), +(3, 'SysUserManage', '用户管理', 'user', '/admin/sys-user', '/0/2/3', 'C', '无', 'admin:sysUser:list', 2, 0, '', '/admin/sys-user/index', 10, '0', '1', 0, 1, '2021-05-20 22:08:44.526', '2023-10-07 22:06:59.446', 0), +(43, '', '新增管理员', 'app-group-fill', '', '/0/2/3/43', 'F', 'POST', 'admin:sysUser:add', 3, 0, '', '', 10, '0', '1', 0, 1, '2021-05-20 22:08:44.526', '2023-10-07 22:06:59.461', 0), +(44, '', '查询管理员', 'app-group-fill', '', '/0/2/3/44', 'F', 'GET', 'admin:sysUser:query', 3, 0, '', '', 40, '0', '1', 0, 1, '2021-05-20 22:08:44.526', '2023-10-07 22:06:59.462', 0), +(45, '', '修改管理员', 'app-group-fill', '', '/0/2/3/45', 'F', 'PUT', 'admin:sysUser:edit', 3, 0, '', '', 30, '0', '1', 0, 1, '2021-05-20 22:08:44.526', '2023-10-07 22:06:59.464', 0), +(46, '', '删除管理员', 'app-group-fill', '', '/0/2/3/46', 'F', 'DELETE', 'admin:sysUser:remove', 3, 0, '', '', 20, '0', '1', 0, 1, '2021-05-20 22:08:44.526', '2023-10-07 22:06:59.465', 0), +(51, 'SysMenuManage', '菜单管理', 'tree-table', '/admin/sys-menu', '/0/2/51', 'C', '无', 'admin:sysMenu:list', 2, 1, '', '/admin/sys-menu/index', 30, '0', '1', 0, 1, '2021-05-20 22:08:44.526', '2023-10-07 22:06:59.447', 0), +(52, 'SysRoleManage', '角色管理', 'peoples', '/admin/sys-role', '/0/2/52', 'C', '无', 'admin:sysRole:list', 2, 1, '', '/admin/sys-role/index', 20, '0', '1', 0, 1, '2021-05-20 22:08:44.526', '2023-10-07 22:06:59.449', 0), +(56, 'SysDeptManage', '部门管理', 'tree', '/admin/sys-dept', '/0/2/56', 'C', '无', 'admin:sysDept:list', 2, 0, '', '/admin/sys-dept/index', 40, '0', '1', 0, 1, '2021-05-20 22:08:44.526', '2023-10-07 22:06:59.450', 0), +(57, 'SysPostManage', '岗位管理', 'pass', '/admin/sys-post', '/0/2/57', 'C', '无', 'admin:sysPost:list', 2, 0, '', '/admin/sys-post/index', 50, '0', '1', 0, 1, '2021-05-20 22:08:44.526', '2023-10-07 22:06:59.451', 0), +(58, 'Dict', '字典管理', 'education', '/admin/dict', '/0/2/58', 'C', '无', 'admin:sysDictType:list', 2, 0, '', '/admin/dict/index', 60, '0', '1', 0, 1, '2021-05-20 22:08:44.526', '2023-10-07 22:06:59.453', 0), +(59, 'SysDictDataManage', '字典数据', 'education', '/admin/dict/data/:dictId', '/0/2/59', 'C', '无', 'admin:sysDictData:list', 2, 0, '', '/admin/dict/data', 100, '1', '1', 0, 1, '2021-05-20 22:08:44.526', '2023-10-07 22:06:59.454', 0), +(60, 'Tools', '开发工具', 'dev-tools', '/dev-tools', '/0/60', 'M', '无', '', 0, 0, '', 'Layout', 40, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.443', 0), +(61, 'Swagger', '系统接口', 'guide', '/dev-tools/swagger', '/0/60/61', 'C', '无', '', 60, 0, '', '/dev-tools/swagger/index', 1, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.501', 0), +(62, 'SysConfigManage', '参数管理', 'swagger', '/admin/sys-config', '/0/2/62', 'C', '无', 'admin:sysConfig:list', 2, 0, '', '/admin/sys-config/index', 70, '0', '1', 0, 1, '2021-05-20 22:08:44.526', '2023-10-07 22:06:59.456', 0), +(211, 'Log', '日志管理', 'log', '/log', '/0/2/211', 'M', '', '', 2, 0, '', '/log/index', 80, '0', '1', 0, 1, '2021-05-20 22:08:44.526', '2023-10-07 22:06:59.457', 0), +(212, 'SysLoginLogManage', '登录日志', 'logininfor', '/admin/sys-login-log', '/0/2/211/212', 'C', '', 'admin:sysLoginLog:list', 211, 0, '', '/admin/sys-login-log/index', 1, '0', '1', 0, 1, '2021-05-20 22:08:44.526', '2023-10-07 22:06:59.512', 0), +(216, 'OperLog', '操作日志', 'skill', '/admin/sys-oper-log', '/0/2/211/216', 'C', '', 'admin:sysOperLog:list', 211, 0, '', '/admin/sys-oper-log/index', 1, '0', '1', 0, 1, '2021-05-20 22:08:44.526', '2023-10-07 22:06:59.513', 0), +(220, '', '新增菜单', 'app-group-fill', '', '/0/2/51/220', 'F', '', 'admin:sysMenu:add', 51, 0, '', '', 1, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.466', 0), +(221, '', '修改菜单', 'app-group-fill', '', '/0/2/51/221', 'F', '', 'admin:sysMenu:edit', 51, 0, '', '', 1, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.468', 0), +(222, '', '查询菜单', 'app-group-fill', '', '/0/2/51/222', 'F', '', 'admin:sysMenu:query', 51, 0, '', '', 1, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.469', 0), +(223, '', '删除菜单', 'app-group-fill', '', '/0/2/51/223', 'F', '', 'admin:sysMenu:remove', 51, 0, '', '', 1, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.470', 0), +(224, '', '新增角色', 'app-group-fill', '', '/0/2/52/224', 'F', '', 'admin:sysRole:add', 52, 0, '', '', 1, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.472', 0), +(225, '', '查询角色', 'app-group-fill', '', '/0/2/52/225', 'F', '', 'admin:sysRole:query', 52, 0, '', '', 1, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.473', 0), +(226, '', '修改角色', 'app-group-fill', '', '/0/2/52/226', 'F', '', 'admin:sysRole:update', 52, 0, '', '', 1, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.474', 0), +(227, '', '删除角色', 'app-group-fill', '', '/0/2/52/227', 'F', '', 'admin:sysRole:remove', 52, 0, '', '', 1, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.476', 0), +(228, '', '查询部门', 'app-group-fill', '', '/0/2/56/228', 'F', '', 'admin:sysDept:query', 56, 0, '', '', 40, '0', '1', 0, 1, '2021-05-20 22:08:44.526', '2023-10-07 22:06:59.477', 0), +(229, '', '新增部门', 'app-group-fill', '', '/0/2/56/229', 'F', '', 'admin:sysDept:add', 56, 0, '', '', 10, '0', '1', 0, 1, '2021-05-20 22:08:44.526', '2023-10-07 22:06:59.479', 0), +(230, '', '修改部门', 'app-group-fill', '', '/0/2/56/230', 'F', '', 'admin:sysDept:edit', 56, 0, '', '', 30, '0', '1', 0, 1, '2021-05-20 22:08:44.526', '2023-10-07 22:06:59.480', 0), +(231, '', '删除部门', 'app-group-fill', '', '/0/2/56/231', 'F', '', 'admin:sysDept:remove', 56, 0, '', '', 20, '0', '1', 0, 1, '2021-05-20 22:08:44.526', '2023-10-07 22:06:59.483', 0), +(232, '', '查询岗位', 'app-group-fill', '', '/0/2/57/232', 'F', '', 'admin:sysPost:query', 57, 0, '', '', 0, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.484', 0), +(233, '', '新增岗位', 'app-group-fill', '', '/0/2/57/233', 'F', '', 'admin:sysPost:add', 57, 0, '', '', 0, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.485', 0), +(234, '', '修改岗位', 'app-group-fill', '', '/0/2/57/234', 'F', '', 'admin:sysPost:edit', 57, 0, '', '', 0, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.487', 0), +(235, '', '删除岗位', 'app-group-fill', '', '/0/2/57/235', 'F', '', 'admin:sysPost:remove', 57, 0, '', '', 0, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.488', 0), +(236, '', '查询字典', 'app-group-fill', '', '/0/2/58/236', 'F', '', 'admin:sysDictType:query', 58, 0, '', '', 0, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.489', 0), +(237, '', '新增类型', 'app-group-fill', '', '/0/2/58/237', 'F', '', 'admin:sysDictType:add', 58, 0, '', '', 0, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.491', 0), +(238, '', '修改类型', 'app-group-fill', '', '/0/2/58/238', 'F', '', 'admin:sysDictType:edit', 58, 0, '', '', 0, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.492', 0), +(239, '', '删除类型', 'app-group-fill', '', '/0/2/58/239', 'F', '', 'system:sysdicttype:remove', 58, 0, '', '', 0, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.494', 0), +(240, '', '查询数据', 'app-group-fill', '', '/0/2/59/240', 'F', '', 'admin:sysDictData:query', 59, 0, '', '', 0, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.495', 0), +(241, '', '新增数据', 'app-group-fill', '', '/0/2/59/241', 'F', '', 'admin:sysDictData:add', 59, 0, '', '', 0, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.497', 0), +(242, '', '修改数据', 'app-group-fill', '', '/0/2/59/242', 'F', '', 'admin:sysDictData:edit', 59, 0, '', '', 0, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.498', 0), +(243, '', '删除数据', 'app-group-fill', '', '/0/2/59/243', 'F', '', 'admin:sysDictData:remove', 59, 0, '', '', 0, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.499', 0), +(244, '', '查询参数', 'app-group-fill', '', '/0/2/62/244', 'F', '', 'admin:sysConfig:query', 62, 0, '', '', 0, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.506', 0), +(245, '', '新增参数', 'app-group-fill', '', '/0/2/62/245', 'F', '', 'admin:sysConfig:add', 62, 0, '', '', 0, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.508', 0), +(246, '', '修改参数', 'app-group-fill', '', '/0/2/62/246', 'F', '', 'admin:sysConfig:edit', 62, 0, '', '', 0, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.509', 0), +(247, '', '删除参数', 'app-group-fill', '', '/0/2/62/247', 'F', '', 'admin:sysConfig:remove', 62, 0, '', '', 0, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.510', 0), +(248, '', '查询登录日志', 'app-group-fill', '', '/0/2/211/212/248', 'F', '', 'admin:sysLoginLog:query', 212, 0, '', '', 0, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.514', 0), +(249, '', '删除登录日志', 'app-group-fill', '', '/0/2/211/212/249', 'F', '', 'admin:sysLoginLog:remove', 212, 0, '', '', 0, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.516', 0), +(250, '', '查询操作日志', 'app-group-fill', '', '/0/2/211/216/250', 'F', '', 'admin:sysOperLog:query', 216, 0, '', '', 0, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.517', 0), +(251, '', '删除操作日志', 'app-group-fill', '', '/0/2/211/216/251', 'F', '', 'admin:sysOperLog:remove', 216, 0, '', '', 0, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.518', 0), +(261, 'Gen', '代码生成', 'code', '/dev-tools/gen', '/0/60/261', 'C', '', '', 60, 0, '', '/dev-tools/gen/index', 2, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.502', 0), +(262, 'EditTable', '代码生成修改', 'build', '/dev-tools/editTable', '/0/60/262', 'C', '', '', 60, 0, '', '/dev-tools/gen/editTable', 100, '1', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.504', 0), +(264, 'Build', '表单构建', 'build', '/dev-tools/build', '/0/60/264', 'C', '', '', 60, 0, '', '/dev-tools/build/index', 1, '0', '1', 1, 1, '2020-04-11 15:52:48.000', '2023-10-07 22:06:59.505', 0), +(269, 'ServerMonitor', '服务监控', 'druid', '/sys-tools/monitor', '/0/537/269', 'C', '', 'sysTools:serverMonitor:list', 537, 0, '', '/sys-tools/monitor', 0, '0', '1', 1, 1, '2020-04-14 00:28:19.000', '2023-10-07 22:06:59.531', 0), +(459, 'Schedule', '定时任务', 'time-range', '/schedule', '/0/459', 'M', '无', '', 0, 0, '', 'Layout', 20, '0', '1', 1, 1, '2020-08-03 09:17:37.000', '2023-10-07 22:06:59.444', 0), +(460, 'ScheduleManage', 'Schedule', 'job', '/schedule/manage', '/0/459/460', 'C', '无', 'job:sysJob:list', 459, 0, '', '/schedule/index', 0, '0', '1', 1, 1, '2020-08-03 09:17:37.000', '2023-10-07 22:06:59.520', 0), +(461, 'sys_job', '分页获取定时任务', 'app-group-fill', '', '/0/459/460/461', 'F', '无', 'job:sysJob:query', 460, 0, '', '', 0, '0', '1', 1, 1, '2020-08-03 09:17:37.000', '2023-10-07 22:06:59.523', 0), +(462, 'sys_job', '创建定时任务', 'app-group-fill', '', '/0/459/460/462', 'F', '无', 'job:sysJob:add', 460, 0, '', '', 0, '0', '1', 1, 1, '2020-08-03 09:17:37.000', '2023-10-07 22:06:59.524', 0), +(463, 'sys_job', '修改定时任务', 'app-group-fill', '', '/0/459/460/463', 'F', '无', 'job:sysJob:edit', 460, 0, '', '', 0, '0', '1', 1, 1, '2020-08-03 09:17:37.000', '2023-10-07 22:06:59.525', 0), +(464, 'sys_job', '删除定时任务', 'app-group-fill', '', '/0/459/460/464', 'F', '无', 'job:sysJob:remove', 460, 0, '', '', 0, '0', '1', 1, 1, '2020-08-03 09:17:37.000', '2023-10-07 22:06:59.527', 0), +(471, 'JobLog', '日志', 'bug', '/schedule/log', '/0/459/471', 'C', '', '', 459, 0, '', '/schedule/log', 0, '1', '1', 1, 1, '2020-08-05 21:24:46.000', '2023-10-07 22:06:59.521', 0), +(528, 'SysApiManage', '接口管理', 'api-doc', '/admin/sys-api', '/0/2/528', 'C', '无', 'admin:sysApi:list', 2, 0, '', '/admin/sys-api/index', 0, '0', '0', 0, 1, '2021-05-20 22:08:44.526', '2023-10-07 22:06:59.458', 0), +(529, '', '查询接口', 'app-group-fill', '', '/0/2/528/529', 'F', '无', 'admin:sysApi:query', 528, 0, '', '', 40, '0', '0', 0, 1, '2021-05-20 22:08:44.526', '2023-10-07 22:06:59.528', 0), +(531, '', '修改接口', 'app-group-fill', '', '/0/2/528/531', 'F', '无', 'admin:sysApi:edit', 528, 0, '', '', 30, '0', '0', 0, 1, '2021-05-20 22:08:44.526', '2023-10-07 22:06:59.529', 0), +(537, 'SysTools', '系统工具', 'system-tools', '/sys-tools', '/0/537', 'M', '', '', 0, 0, '', 'Layout', 30, '0', '1', 1, 1, '2021-05-21 11:13:32.166', '2023-10-07 22:06:59.444', 0); + +DROP TABLE IF EXISTS `sys_menu_api_rule`; +CREATE TABLE `sys_menu_api_rule` ( + `sys_menu_menu_id` bigint NOT NULL, + `sys_api_id` bigint NOT NULL COMMENT '主键编码', + PRIMARY KEY (`sys_menu_menu_id`,`sys_api_id`), + KEY `fk_sys_menu_api_rule_sys_api` (`sys_api_id`), + CONSTRAINT `fk_sys_menu_api_rule_sys_api` FOREIGN KEY (`sys_api_id`) REFERENCES `sys_api` (`id`), + CONSTRAINT `fk_sys_menu_api_rule_sys_menu` FOREIGN KEY (`sys_menu_menu_id`) REFERENCES `sys_menu` (`menu_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +INSERT INTO `sys_menu_api_rule` (`sys_menu_menu_id`, `sys_api_id`) VALUES +(216, 6), +(250, 6), +(58, 21), +(236, 21), +(238, 23), +(59, 24), +(240, 24), +(242, 25), +(58, 26), +(236, 26), +(56, 27), +(228, 27), +(230, 28), +(226, 29), +(51, 39), +(222, 39), +(221, 41), +(52, 44), +(225, 44), +(226, 45), +(226, 46), +(226, 47), +(62, 53), +(244, 53), +(246, 54), +(57, 59), +(232, 59), +(234, 60), +(241, 80), +(237, 81), +(229, 82), +(245, 87), +(220, 88), +(233, 89), +(224, 90), +(531, 92), +(242, 101), +(238, 102), +(230, 103), +(226, 106), +(226, 107), +(246, 108), +(221, 109), +(234, 110), +(249, 114), +(251, 115), +(243, 120), +(239, 121), +(231, 122), +(247, 125), +(223, 126), +(235, 127), +(227, 128), +(51, 135), +(528, 135), +(529, 135), +(531, 136), +(212, 137), +(248, 137), +(542, 139), +(540, 140), +(3, 141), +(44, 141), +(45, 142), +(43, 150), +(45, 151), +(46, 156); + +DROP TABLE IF EXISTS `sys_migration`; +CREATE TABLE `sys_migration` ( + `version` varchar(191) NOT NULL, + `apply_time` datetime(3) DEFAULT NULL, + PRIMARY KEY (`version`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +INSERT INTO `sys_migration` (`version`, `apply_time`) VALUES +('1599190683659', '2023-10-07 22:06:59.438'), +('1653638869132', '2023-10-07 22:06:59.533'); + +DROP TABLE IF EXISTS `sys_opera_log`; +CREATE TABLE `sys_opera_log` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键编码', + `title` varchar(255) DEFAULT NULL COMMENT '操作模块', + `business_type` varchar(128) DEFAULT NULL COMMENT '操作类型', + `business_types` varchar(128) DEFAULT NULL COMMENT 'BusinessTypes', + `method` varchar(128) DEFAULT NULL COMMENT '函数', + `request_method` varchar(128) DEFAULT NULL COMMENT '请求方式: GET POST PUT DELETE', + `operator_type` varchar(128) DEFAULT NULL COMMENT '操作类型', + `oper_name` varchar(128) DEFAULT NULL COMMENT '操作者', + `dept_name` varchar(128) DEFAULT NULL COMMENT '部门名称', + `oper_url` varchar(255) DEFAULT NULL COMMENT '访问地址', + `oper_ip` varchar(128) DEFAULT NULL COMMENT '客户端ip', + `oper_location` varchar(128) DEFAULT NULL COMMENT '访问位置', + `oper_param` text COMMENT '请求参数', + `status` varchar(4) DEFAULT NULL COMMENT '操作状态 1:正常 2:关闭', + `oper_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '操作时间', + `json_result` varchar(255) DEFAULT NULL COMMENT '返回数据', + `remark` varchar(255) DEFAULT NULL COMMENT '备注', + `latency_time` varchar(128) DEFAULT NULL COMMENT '耗时', + `user_agent` varchar(255) DEFAULT NULL COMMENT 'ua', + `created_at` datetime(3) DEFAULT NULL COMMENT '创建时间', + `updated_at` datetime(3) DEFAULT NULL COMMENT '最后更新时间', + `create_by` bigint DEFAULT NULL COMMENT '创建者', + `update_by` bigint DEFAULT NULL COMMENT '更新者', + PRIMARY KEY (`id`), + KEY `idx_sys_opera_log_create_by` (`create_by`), + KEY `idx_sys_opera_log_update_by` (`update_by`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + +DROP TABLE IF EXISTS `sys_post`; +CREATE TABLE `sys_post` ( + `post_id` bigint NOT NULL AUTO_INCREMENT, + `post_name` varchar(128) DEFAULT NULL, + `post_code` varchar(128) DEFAULT NULL, + `sort` tinyint DEFAULT NULL, + `status` tinyint DEFAULT NULL, + `remark` varchar(255) DEFAULT NULL, + `create_by` bigint DEFAULT NULL COMMENT '创建者', + `update_by` bigint DEFAULT NULL COMMENT '更新者', + `created_at` datetime(3) DEFAULT NULL COMMENT '创建时间', + `updated_at` datetime(3) DEFAULT NULL COMMENT '最后更新时间', + `deleted_at` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除状态', + PRIMARY KEY (`post_id`), + KEY `idx_sys_post_create_by` (`create_by`), + KEY `idx_sys_post_update_by` (`update_by`), + KEY `idx_sys_post_deleted_at` (`deleted_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +INSERT INTO `sys_post` (`post_id`, `post_name`, `post_code`, `sort`, `status`, `remark`, `create_by`, `update_by`, `created_at`, `updated_at`, `deleted_at`) VALUES +(1, '首席执行官', 'CEO', 0, 2, '首席执行官', 1, 1, '2021-05-13 19:56:37.913', '2021-05-13 19:56:37.913', 0), +(2, '首席技术执行官', 'CTO', 2, 2, '首席技术执行官', 1, 1, '2021-05-13 19:56:37.913', '2021-05-13 19:56:37.913', 0), +(3, '首席运营官', 'COO', 3, 2, '测试工程师', 1, 1, '2021-05-13 19:56:37.913', '2021-05-13 19:56:37.913', 0); + +DROP TABLE IF EXISTS `sys_role`; +CREATE TABLE `sys_role` ( + `role_id` bigint NOT NULL AUTO_INCREMENT, + `role_name` varchar(128) DEFAULT NULL, + `status` varchar(4) DEFAULT NULL, + `role_key` varchar(128) DEFAULT NULL, + `role_sort` bigint DEFAULT NULL, + `flag` varchar(128) DEFAULT NULL, + `remark` varchar(255) DEFAULT NULL, + `admin` tinyint(1) DEFAULT NULL, + `data_scope` varchar(128) DEFAULT NULL, + `create_by` bigint DEFAULT NULL COMMENT '创建者', + `update_by` bigint DEFAULT NULL COMMENT '更新者', + `created_at` datetime(3) DEFAULT NULL COMMENT '创建时间', + `updated_at` datetime(3) DEFAULT NULL COMMENT '最后更新时间', + `deleted_at` tinyint NOT NULL DEFAULT '0' COMMENT '删除状态', + PRIMARY KEY (`role_id`), + KEY `idx_sys_role_update_by` (`update_by`), + KEY `idx_sys_role_deleted_at` (`deleted_at`), + KEY `idx_sys_role_create_by` (`create_by`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +INSERT INTO `sys_role` (`role_id`, `role_name`, `status`, `role_key`, `role_sort`, `flag`, `remark`, `admin`, `data_scope`, `create_by`, `update_by`, `created_at`, `updated_at`, `deleted_at`) VALUES +(1, '系统管理员', '2', 'admin', 1, '', '', 1, '', 1, 1, '2021-05-13 19:56:37.913', '2021-05-13 19:56:37.913', 0); + +DROP TABLE IF EXISTS `sys_role_dept`; +CREATE TABLE `sys_role_dept` ( + `role_id` smallint NOT NULL, + `dept_id` smallint NOT NULL, + PRIMARY KEY (`role_id`,`dept_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + +DROP TABLE IF EXISTS `sys_role_menu`; +CREATE TABLE `sys_role_menu` ( + `role_id` bigint NOT NULL, + `menu_id` bigint NOT NULL, + PRIMARY KEY (`role_id`,`menu_id`), + KEY `fk_sys_role_menu_sys_menu` (`menu_id`), + CONSTRAINT `fk_sys_role_menu_sys_menu` FOREIGN KEY (`menu_id`) REFERENCES `sys_menu` (`menu_id`), + CONSTRAINT `fk_sys_role_menu_sys_role` FOREIGN KEY (`role_id`) REFERENCES `sys_role` (`role_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + +DROP TABLE IF EXISTS `sys_tables`; +CREATE TABLE `sys_tables` ( + `table_id` bigint NOT NULL AUTO_INCREMENT, + `table_name` varchar(255) DEFAULT NULL, + `table_comment` varchar(255) DEFAULT NULL, + `class_name` varchar(255) DEFAULT NULL, + `tpl_category` varchar(255) DEFAULT NULL, + `package_name` varchar(255) DEFAULT NULL, + `module_name` varchar(255) DEFAULT NULL, + `module_front_name` varchar(255) DEFAULT NULL COMMENT '前端文件名', + `business_name` varchar(255) DEFAULT NULL, + `function_name` varchar(255) DEFAULT NULL, + `function_author` varchar(255) DEFAULT NULL, + `pk_column` varchar(255) DEFAULT NULL, + `pk_go_field` varchar(255) DEFAULT NULL, + `pk_json_field` varchar(255) DEFAULT NULL, + `options` varchar(255) DEFAULT NULL, + `tree_code` varchar(255) DEFAULT NULL, + `tree_parent_code` varchar(255) DEFAULT NULL, + `tree_name` varchar(255) DEFAULT NULL, + `tree` tinyint(1) DEFAULT '0', + `crud` tinyint(1) DEFAULT '1', + `remark` varchar(255) DEFAULT NULL, + `is_data_scope` tinyint DEFAULT NULL, + `is_actions` tinyint DEFAULT NULL, + `is_auth` tinyint DEFAULT NULL, + `is_logical_delete` varchar(1) DEFAULT NULL, + `logical_delete` tinyint(1) DEFAULT NULL, + `logical_delete_column` varchar(128) DEFAULT NULL, + `created_at` datetime(3) DEFAULT NULL COMMENT '创建时间', + `updated_at` datetime(3) DEFAULT NULL COMMENT '最后更新时间', + `deleted_at` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除状态', + `create_by` bigint DEFAULT NULL COMMENT '创建者', + `update_by` bigint DEFAULT NULL COMMENT '更新者', + PRIMARY KEY (`table_id`), + KEY `idx_sys_tables_update_by` (`update_by`), + KEY `idx_sys_tables_deleted_at` (`deleted_at`), + KEY `idx_sys_tables_create_by` (`create_by`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + + +DROP TABLE IF EXISTS `sys_user`; +CREATE TABLE `sys_user` ( + `user_id` bigint NOT NULL AUTO_INCREMENT COMMENT '编码', + `username` varchar(64) DEFAULT NULL COMMENT '用户名', + `password` varchar(128) DEFAULT NULL COMMENT '密码', + `nick_name` varchar(128) DEFAULT NULL COMMENT '昵称', + `phone` varchar(11) DEFAULT NULL COMMENT '手机号', + `role_id` bigint DEFAULT NULL COMMENT '角色ID', + `salt` varchar(255) DEFAULT NULL COMMENT '加盐', + `avatar` varchar(255) DEFAULT NULL COMMENT '头像', + `sex` varchar(255) DEFAULT NULL COMMENT '性别', + `email` varchar(128) DEFAULT NULL COMMENT '邮箱', + `dept_id` bigint DEFAULT NULL COMMENT '部门', + `post_id` bigint DEFAULT NULL COMMENT '岗位', + `remark` varchar(255) DEFAULT NULL COMMENT '备注', + `status` varchar(4) DEFAULT NULL COMMENT '状态', + `create_by` bigint DEFAULT NULL COMMENT '创建者', + `update_by` bigint DEFAULT NULL COMMENT '更新者', + `created_at` datetime(3) DEFAULT NULL COMMENT '创建时间', + `updated_at` datetime(3) DEFAULT NULL COMMENT '最后更新时间', + `deleted_at` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除状态', + PRIMARY KEY (`user_id`), + KEY `idx_sys_user_deleted_at` (`deleted_at`), + KEY `idx_sys_user_create_by` (`create_by`), + KEY `idx_sys_user_update_by` (`update_by`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +INSERT INTO `sys_user` (`user_id`, `username`, `password`, `nick_name`, `phone`, `role_id`, `salt`, `avatar`, `sex`, `email`, `dept_id`, `post_id`, `remark`, `status`, `create_by`, `update_by`, `created_at`, `updated_at`, `deleted_at`) VALUES +(1, 'admin', '$2a$10$4OSTPXRkCVZV7JEZT27OIevOuKOs6k2kOKSh4phm.NXhHeVgC1nQG', 'admin', '13524084051', 1, '', '', '0', 'nice.lizhi@gmail.com', 1, 2, 'admin', '2', 1, 1, '2021-05-13 19:56:37.914', '2023-11-01 13:26:12.236', 0); + +-- 2023-11-05 02:47:37 \ No newline at end of file diff --git a/deploy/docker-compose/mysql_init/user.sql b/deploy/docker-compose/mysql_init/user.sql new file mode 100644 index 0000000..6e89aeb --- /dev/null +++ b/deploy/docker-compose/mysql_init/user.sql @@ -0,0 +1,3 @@ +CREATE DATABASE IF NOT EXISTS easy_admin; +CREATE USER easyadmin@'*' IDENTIFIED BY 'easyadmin123'; +GRANT ALL ON easyadmin.* TO fate@'*'; \ No newline at end of file