mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
200 lines
12 KiB
SQL
200 lines
12 KiB
SQL
/*
|
|
Navicat Premium Data Transfer
|
|
|
|
Source Server : local.server.cuci.cc
|
|
Source Server Type : MySQL
|
|
Source Server Version : 50562
|
|
Source Host : server.cuci.cc:3306
|
|
Source Schema : admin_v6
|
|
|
|
Target Server Type : MySQL
|
|
Target Server Version : 50562
|
|
File Encoding : 65001
|
|
|
|
Date: 03/12/2019 11:27:46
|
|
*/
|
|
|
|
SET NAMES utf8mb4;
|
|
SET FOREIGN_KEY_CHECKS = 0;
|
|
|
|
-- ----------------------------
|
|
-- Table structure for system_auth
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `system_auth`;
|
|
CREATE TABLE `system_auth` (
|
|
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
`title` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限名称',
|
|
`status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '权限状态',
|
|
`sort` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '排序权重',
|
|
`desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注说明',
|
|
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
INDEX `idx_system_auth_status`(`status`) USING BTREE,
|
|
INDEX `idx_system_auth_title`(`title`) USING BTREE
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-权限';
|
|
|
|
-- ----------------------------
|
|
-- Table structure for system_auth_node
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `system_auth_node`;
|
|
CREATE TABLE `system_auth_node` (
|
|
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
`auth` bigint(20) UNSIGNED NULL DEFAULT NULL COMMENT '角色',
|
|
`node` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '节点',
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
INDEX `idx_system_auth_auth`(`auth`) USING BTREE,
|
|
INDEX `idx_system_auth_node`(`node`(191)) USING BTREE
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-权限-授权';
|
|
|
|
-- ----------------------------
|
|
-- Table structure for system_config
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `system_config`;
|
|
CREATE TABLE `system_config` (
|
|
`type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '分类',
|
|
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配置名',
|
|
`value` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配置值',
|
|
INDEX `idx_system_config_type`(`type`) USING BTREE,
|
|
INDEX `idx_system_config_name`(`name`) USING BTREE
|
|
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-配置';
|
|
|
|
-- ----------------------------
|
|
-- Records of system_config
|
|
-- ----------------------------
|
|
INSERT INTO `system_config` VALUES ('base', 'app_name', 'ThinkAdmin');
|
|
INSERT INTO `system_config` VALUES ('base', 'app_version', 'v6.0');
|
|
INSERT INTO `system_config` VALUES ('base', 'site_name', 'ThinkAdmin');
|
|
INSERT INTO `system_config` VALUES ('base', 'site_icon', 'http://static.ctolog.com//Fhx3kJQtSMjq26w96rAIb97tnGAO');
|
|
INSERT INTO `system_config` VALUES ('base', 'miitbeian', '粤ICP备16006642号-2');
|
|
INSERT INTO `system_config` VALUES ('base', 'site_copy', '©版权所有 2014-2020 楚才科技');
|
|
INSERT INTO `system_config` VALUES ('storage', 'type', 'local');
|
|
INSERT INTO `system_config` VALUES ('storage', 'allow_exts', 'doc,gif,icon,jpg,mp3,mp4,p12,pem,png,rar,xls,xlsx');
|
|
INSERT INTO `system_config` VALUES ('storage', 'qiniu_http_protocol', 'http');
|
|
INSERT INTO `system_config` VALUES ('storage', 'qiniu_region', '华东');
|
|
INSERT INTO `system_config` VALUES ('storage', 'qiniu_bucket', 'static');
|
|
INSERT INTO `system_config` VALUES ('storage', 'qiniu_http_domain', 'static.ctolog.com');
|
|
INSERT INTO `system_config` VALUES ('storage', 'qiniu_access_key', '请使用自己的七牛云账号');
|
|
INSERT INTO `system_config` VALUES ('storage', 'qiniu_secret_key', '请使用自己的七牛云账号');
|
|
|
|
-- ----------------------------
|
|
-- Table structure for system_data
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `system_data`;
|
|
CREATE TABLE `system_data` (
|
|
`id` bigint(11) UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '配置名',
|
|
`value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '配置值',
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
INDEX `idx_system_data_name`(`name`) USING BTREE
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-数据';
|
|
|
|
-- ----------------------------
|
|
-- Table structure for system_menu
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `system_menu`;
|
|
CREATE TABLE `system_menu` (
|
|
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
`pid` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT 'PID',
|
|
`title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '名称',
|
|
`node` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '节点代码',
|
|
`icon` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '菜单图标',
|
|
`url` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '链接',
|
|
`params` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '链接参数',
|
|
`target` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '_self' COMMENT '打开方式',
|
|
`sort` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '菜单排序',
|
|
`status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '状态(0:禁用,1:启用)',
|
|
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
INDEX `idx_system_menu_node`(`node`(191)) USING BTREE,
|
|
INDEX `idx_system_menu_status`(`status`) USING BTREE
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 51 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-菜单';
|
|
|
|
-- ----------------------------
|
|
-- Records of system_menu
|
|
-- ----------------------------
|
|
INSERT INTO `system_menu` VALUES (1, 0, '后台首页', '', '', 'admin/index/main', '', '_self', 500, 1, '2018-09-05 17:59:38');
|
|
INSERT INTO `system_menu` VALUES (2, 0, '系统管理', '', '', '#', '', '_self', 100, 1, '2018-09-05 18:04:52');
|
|
INSERT INTO `system_menu` VALUES (3, 4, '系统菜单管理', '', 'layui-icon layui-icon-layouts', 'admin/menu/index', '', '_self', 1, 1, '2018-09-05 18:05:26');
|
|
INSERT INTO `system_menu` VALUES (4, 2, '系统配置', '', '', '#', '', '_self', 20, 1, '2018-09-05 18:07:17');
|
|
INSERT INTO `system_menu` VALUES (5, 12, '系统用户管理', '', 'layui-icon layui-icon-username', 'admin/user/index', '', '_self', 1, 1, '2018-09-06 11:10:42');
|
|
INSERT INTO `system_menu` VALUES (7, 12, '访问权限管理', '', 'layui-icon layui-icon-vercode', 'admin/auth/index', '', '_self', 2, 1, '2018-09-06 15:17:14');
|
|
INSERT INTO `system_menu` VALUES (11, 4, '系统参数配置', '', 'layui-icon layui-icon-set', 'admin/config/index', '', '_self', 4, 1, '2018-09-06 16:43:47');
|
|
INSERT INTO `system_menu` VALUES (12, 2, '权限管理', '', '', '#', '', '_self', 10, 1, '2018-09-06 18:01:31');
|
|
INSERT INTO `system_menu` VALUES (27, 4, '系统任务管理', '', 'layui-icon layui-icon-log', 'admin/queue/index', '', '_self', 3, 1, '2018-11-29 11:13:34');
|
|
INSERT INTO `system_menu` VALUES (49, 4, '系统日志管理', '', 'layui-icon layui-icon-form', 'admin/oplog/index', '', '_self', 2, 1, '2019-02-18 12:56:56');
|
|
|
|
-- ----------------------------
|
|
-- Table structure for system_oplog
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `system_oplog`;
|
|
CREATE TABLE `system_oplog` (
|
|
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
`node` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '当前操作节点',
|
|
`geoip` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '操作者IP地址',
|
|
`action` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '操作行为名称',
|
|
`content` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '操作内容描述',
|
|
`username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '操作人用户名',
|
|
`create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 197 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-日志';
|
|
|
|
-- ----------------------------
|
|
-- Table structure for system_queue
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `system_queue`;
|
|
CREATE TABLE `system_queue` (
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
`code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '任务编号',
|
|
`title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '任务名称',
|
|
`command` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '执行指令',
|
|
`exec_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '执行参数',
|
|
`exec_time` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '执行时间',
|
|
`exec_desc` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '状态描述',
|
|
`enter_time` decimal(20, 4) NULL DEFAULT 0.0000 COMMENT '开始时间',
|
|
`outer_time` decimal(20, 4) NULL DEFAULT 0.0000 COMMENT '结束时间',
|
|
`attempts` bigint(20) NULL DEFAULT 0 COMMENT '执行次数',
|
|
`rscript` tinyint(1) NULL DEFAULT 1 COMMENT '单例模式',
|
|
`status` tinyint(1) NULL DEFAULT 1 COMMENT '任务状态(1新任务,2处理中,3成功,4失败)',
|
|
`create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
INDEX `idx_system_queue_code`(`code`) USING BTREE,
|
|
INDEX `idx_system_queue_title`(`title`) USING BTREE,
|
|
INDEX `idx_system_queue_status`(`status`) USING BTREE,
|
|
INDEX `idx_system_queue_rscript`(`rscript`) USING BTREE,
|
|
INDEX `idx_system_queue_create_at`(`create_at`) USING BTREE,
|
|
INDEX `idx_system_queue_exec_time`(`exec_time`) USING BTREE
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-任务';
|
|
|
|
-- ----------------------------
|
|
-- Table structure for system_user
|
|
-- ----------------------------
|
|
DROP TABLE IF EXISTS `system_user`;
|
|
CREATE TABLE `system_user` (
|
|
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
`username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户账号',
|
|
`password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户密码',
|
|
`qq` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系QQ',
|
|
`mail` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系邮箱',
|
|
`phone` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系手机',
|
|
`login_at` datetime NULL DEFAULT NULL COMMENT '登录时间',
|
|
`login_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '登录IP',
|
|
`login_num` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '登录次数',
|
|
`authorize` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '权限授权',
|
|
`tags` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户标签',
|
|
`desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注说明',
|
|
`status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '状态(0禁用,1启用)',
|
|
`is_deleted` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '删除(1删除,0未删)',
|
|
`create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
INDEX `idx_system_user_username`(`username`) USING BTREE,
|
|
INDEX `idx_system_user_status`(`status`) USING BTREE,
|
|
INDEX `idx_system_user_deleted`(`is_deleted`) USING BTREE
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 10001 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-用户';
|
|
|
|
-- ----------------------------
|
|
-- Records of system_user
|
|
-- ----------------------------
|
|
INSERT INTO `system_user` VALUES (10000, 'admin', '21232f297a57a5a743894a0e4a801fc3', '22222222', '', '', '2019-12-02 20:23:49', '112.5.182.154', 1, '', '', '', 1, 0, '2015-11-13 15:14:22');
|
|
|
|
SET FOREIGN_KEY_CHECKS = 1;
|