2021-05-30 23:42:25 +08:00
|
|
|
|
/*
|
|
|
|
|
Navicat Premium Data Transfer
|
|
|
|
|
|
2021-06-20 00:58:53 +08:00
|
|
|
|
Source Server : www.youlai.tech
|
2021-05-30 23:42:25 +08:00
|
|
|
|
Source Server Type : MySQL
|
2021-06-20 00:58:53 +08:00
|
|
|
|
Source Server Version : 80023
|
|
|
|
|
Source Host : www.youlai.tech:3306
|
2021-05-30 23:42:25 +08:00
|
|
|
|
Source Schema : youlai
|
|
|
|
|
|
|
|
|
|
Target Server Type : MySQL
|
2021-06-20 00:58:53 +08:00
|
|
|
|
Target Server Version : 80023
|
2021-05-30 23:42:25 +08:00
|
|
|
|
File Encoding : 65001
|
|
|
|
|
|
2021-06-20 00:58:53 +08:00
|
|
|
|
Date: 20/06/2021 00:52:36
|
2021-05-30 23:42:25 +08:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
SET NAMES utf8mb4;
|
|
|
|
|
SET FOREIGN_KEY_CHECKS = 0;
|
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Table structure for sys_dept
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `sys_dept`;
|
|
|
|
|
CREATE TABLE `sys_dept` (
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
2021-05-30 23:42:25 +08:00
|
|
|
|
`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '部门名称',
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`parent_id` int(0) NULL DEFAULT 0 COMMENT '父节点id',
|
2021-05-30 23:42:25 +08:00
|
|
|
|
`tree_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '父节点id路径',
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`sort` int(0) NULL DEFAULT 0 COMMENT '显示顺序',
|
2021-06-07 01:49:41 +08:00
|
|
|
|
`status` tinyint(1) NULL DEFAULT 0 COMMENT '状态:1-正常 0-禁用',
|
|
|
|
|
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除状态:1-删除 0-未删除',
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`gmt_create` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
|
|
|
|
|
`gmt_modified` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
|
2021-05-30 23:42:25 +08:00
|
|
|
|
PRIMARY KEY (`id`) USING BTREE
|
2021-06-20 00:58:53 +08:00
|
|
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '部门表' ROW_FORMAT = Dynamic;
|
2021-05-30 23:42:25 +08:00
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Records of sys_dept
|
|
|
|
|
-- ----------------------------
|
2021-06-07 01:49:41 +08:00
|
|
|
|
INSERT INTO `sys_dept` VALUES (1, '有来技术', 0, '0', 1, 1, 0, NULL, NULL);
|
|
|
|
|
INSERT INTO `sys_dept` VALUES (2, '研发部门', 1, '0,1', 1, 1, 0, '2021-06-03 00:33:56', '2021-06-03 00:33:56');
|
2021-05-30 23:42:25 +08:00
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Table structure for sys_dict
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `sys_dict`;
|
|
|
|
|
CREATE TABLE `sys_dict` (
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '主键 ',
|
2021-05-30 23:42:25 +08:00
|
|
|
|
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '类型名称',
|
|
|
|
|
`code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '类型编码',
|
|
|
|
|
`status` tinyint(1) NULL DEFAULT 0 COMMENT '状态(0-正常 ,1-停用)',
|
|
|
|
|
`remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`gmt_create` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
|
|
|
|
|
`gmt_modified` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
|
2021-05-30 23:42:25 +08:00
|
|
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
|
|
|
UNIQUE INDEX `type_code`(`code`) USING BTREE
|
2021-06-20 00:58:53 +08:00
|
|
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '字典类型表' ROW_FORMAT = Dynamic;
|
2021-05-30 23:42:25 +08:00
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Records of sys_dict
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
INSERT INTO `sys_dict` VALUES (1, '性别', 'gender', 1, '性别', '2019-12-06 19:03:32', '2021-02-08 14:58:01');
|
|
|
|
|
INSERT INTO `sys_dict` VALUES (11, '授权方式', 'grant_type', 1, NULL, '2020-10-17 08:09:50', '2021-01-31 09:48:24');
|
2021-06-20 00:58:53 +08:00
|
|
|
|
INSERT INTO `sys_dict` VALUES (24, '微服务列表', 'micro_service', 1, '设置URL权限标识使用', '2021-06-17 00:13:43', '2021-06-17 00:17:22');
|
|
|
|
|
INSERT INTO `sys_dict` VALUES (25, '请求方式', 'request_method', 1, '设置URL权限标识使用', '2021-06-17 00:18:07', '2021-06-17 00:18:07');
|
2021-05-30 23:42:25 +08:00
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Table structure for sys_dict_item
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `sys_dict_item`;
|
|
|
|
|
CREATE TABLE `sys_dict_item` (
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
2021-05-30 23:42:25 +08:00
|
|
|
|
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典项名称',
|
|
|
|
|
`value` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典项值',
|
|
|
|
|
`dict_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典编码',
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`sort` int(0) NULL DEFAULT 0 COMMENT '排序',
|
2021-05-30 23:42:25 +08:00
|
|
|
|
`status` tinyint(1) NULL DEFAULT 0 COMMENT '状态(0 停用 1正常)',
|
|
|
|
|
`defaulted` tinyint(1) NULL DEFAULT 0 COMMENT '是否默认(0否 1是)',
|
|
|
|
|
`remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '备注',
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`gmt_create` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
|
|
|
|
|
`gmt_modified` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
|
2021-05-30 23:42:25 +08:00
|
|
|
|
PRIMARY KEY (`id`) USING BTREE
|
2021-06-20 00:58:53 +08:00
|
|
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 49 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '字典数据表' ROW_FORMAT = Dynamic;
|
2021-05-30 23:42:25 +08:00
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Records of sys_dict_item
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
INSERT INTO `sys_dict_item` VALUES (1, '男', '1', 'gender', 1, 1, 0, '性别男', '2019-05-05 13:07:52', '2019-07-02 14:23:05');
|
|
|
|
|
INSERT INTO `sys_dict_item` VALUES (2, '女', '2', 'gender', 2, 1, 0, '性别女', '2019-04-19 11:33:00', '2019-07-02 14:23:05');
|
|
|
|
|
INSERT INTO `sys_dict_item` VALUES (5, '未知', '0', 'gender', 1, 1, 0, '', '2020-10-17 08:09:31', '2020-10-17 08:09:31');
|
|
|
|
|
INSERT INTO `sys_dict_item` VALUES (6, '密码模式', 'password', 'grant_type', 1, 1, 0, '', '2020-10-17 09:11:52', '2021-01-31 09:48:18');
|
|
|
|
|
INSERT INTO `sys_dict_item` VALUES (7, '授权码模式', 'authorization_code', 'grant_type', 1, 1, 0, '', '2020-10-17 09:12:15', '2020-12-14 10:11:00');
|
|
|
|
|
INSERT INTO `sys_dict_item` VALUES (8, '客户端模式', 'client_credentials', 'grant_type', 1, 1, 0, '', '2020-10-17 09:12:36', '2020-12-14 10:11:00');
|
|
|
|
|
INSERT INTO `sys_dict_item` VALUES (9, '刷新模式', 'refresh_token', 'grant_type', 1, 1, 0, '', '2020-10-17 09:12:57', '2021-01-08 17:33:12');
|
|
|
|
|
INSERT INTO `sys_dict_item` VALUES (10, '简化模式', 'implicit', 'grant_type', 1, 1, 0, '', '2020-10-17 09:13:23', '2020-12-14 10:11:00');
|
2021-06-20 00:58:53 +08:00
|
|
|
|
INSERT INTO `sys_dict_item` VALUES (38, '系统服务', 'answer-admin', 'micro_service', 1, 1, 0, '', '2021-06-17 00:14:12', '2021-06-17 00:14:12');
|
|
|
|
|
INSERT INTO `sys_dict_item` VALUES (39, '会员服务', 'answer-user', 'micro_service', 2, 1, 0, '', '2021-06-17 00:15:06', '2021-06-17 00:15:06');
|
|
|
|
|
INSERT INTO `sys_dict_item` VALUES (40, '商品服务', 'answer-product', 'micro_service', 3, 1, 0, '', '2021-06-17 00:15:26', '2021-06-17 00:16:18');
|
|
|
|
|
INSERT INTO `sys_dict_item` VALUES (41, '订单服务', 'answer-order', 'micro_service', 4, 1, 0, '', '2021-06-17 00:15:40', '2021-06-17 00:16:10');
|
|
|
|
|
INSERT INTO `sys_dict_item` VALUES (42, '营销服务', 'answer-sms', 'micro_service', 5, 1, 0, '', '2021-06-17 00:16:01', '2021-06-17 00:16:01');
|
|
|
|
|
INSERT INTO `sys_dict_item` VALUES (43, '不限', '*', 'request_method', 1, 1, 0, '', '2021-06-17 00:18:34', '2021-06-17 00:18:34');
|
|
|
|
|
INSERT INTO `sys_dict_item` VALUES (44, 'GET', 'GET', 'request_method', 2, 1, 0, '', '2021-06-17 00:18:55', '2021-06-17 00:18:55');
|
|
|
|
|
INSERT INTO `sys_dict_item` VALUES (45, 'POST', 'POST', 'request_method', 3, 1, 0, '', '2021-06-17 00:19:06', '2021-06-17 00:19:06');
|
|
|
|
|
INSERT INTO `sys_dict_item` VALUES (46, 'PUT', 'PUT', 'request_method', 4, 1, 0, '', '2021-06-17 00:19:17', '2021-06-17 00:19:17');
|
|
|
|
|
INSERT INTO `sys_dict_item` VALUES (47, 'DELETE', 'DELETE', 'request_method', 5, 1, 0, '', '2021-06-17 00:19:30', '2021-06-17 00:19:30');
|
|
|
|
|
INSERT INTO `sys_dict_item` VALUES (48, 'PATCH', 'PATCH', 'request_method', 6, 1, 0, '', '2021-06-17 00:19:42', '2021-06-17 00:19:42');
|
2021-05-30 23:42:25 +08:00
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Table structure for sys_menu
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `sys_menu`;
|
|
|
|
|
CREATE TABLE `sys_menu` (
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`id` bigint(0) NOT NULL AUTO_INCREMENT,
|
2021-05-30 23:42:25 +08:00
|
|
|
|
`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '菜单名称',
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`parent_id` bigint(0) NULL DEFAULT NULL COMMENT '父菜单ID',
|
2021-06-07 01:49:41 +08:00
|
|
|
|
`route_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '路由名称',
|
|
|
|
|
`route_path` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '路由路径',
|
2021-05-30 23:42:25 +08:00
|
|
|
|
`component` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '组件路径',
|
|
|
|
|
`redirect` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '跳转路径',
|
|
|
|
|
`icon` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '菜单图标',
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`sort` int(0) NULL DEFAULT 0 COMMENT '排序',
|
2021-05-30 23:42:25 +08:00
|
|
|
|
`visible` tinyint(1) NULL DEFAULT 1 COMMENT '状态:0-禁用 1-开启',
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`gmt_create` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
|
|
|
|
|
`gmt_modified` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
|
2021-05-30 23:42:25 +08:00
|
|
|
|
PRIMARY KEY (`id`) USING BTREE
|
2021-06-20 00:58:53 +08:00
|
|
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 73 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '菜单管理' ROW_FORMAT = Dynamic;
|
2021-05-30 23:42:25 +08:00
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Records of sys_menu
|
|
|
|
|
-- ----------------------------
|
2021-06-07 01:49:41 +08:00
|
|
|
|
INSERT INTO `sys_menu` VALUES (1, '系统管理', 0, 'system', '/system', 'Layout', '', 'table', 1, 1, '2020-09-23 09:12:21', '2021-05-21 11:09:57');
|
|
|
|
|
INSERT INTO `sys_menu` VALUES (2, '用户管理', 1, 'system_user', 'user', 'admin/user/index', '', 'user', 1, 1, NULL, '2021-06-06 23:36:28');
|
|
|
|
|
INSERT INTO `sys_menu` VALUES (4, '菜单管理', 1, 'system_menu', 'menu', 'admin/menu/index', NULL, 'tree-table', 3, 1, '2020-09-23 09:12:21', '2021-03-09 09:30:44');
|
|
|
|
|
INSERT INTO `sys_menu` VALUES (5, '字典管理', 1, 'system_dict', 'dict', 'admin/dict/index', NULL, 'education', 5, 1, '2020-09-23 09:12:21', '2021-03-09 09:30:53');
|
|
|
|
|
INSERT INTO `sys_menu` VALUES (6, '部门管理', 1, 'system_dept', 'dept', 'admin/dept/index', NULL, 'tree', 4, 1, '2020-09-23 09:12:21', '2021-03-09 09:30:50');
|
|
|
|
|
INSERT INTO `sys_menu` VALUES (8, '客户端管理', 1, 'system_client', 'client', 'admin/client/index', NULL, 'tab', 6, 1, '2020-10-17 08:04:08', '2021-03-09 09:30:56');
|
|
|
|
|
INSERT INTO `sys_menu` VALUES (9, '营销管理', 0, 'sms', '/sms', 'Layout', '', 'number', 3, 1, '2020-10-24 15:24:04', '2021-03-02 18:00:13');
|
|
|
|
|
INSERT INTO `sys_menu` VALUES (10, '广告管理', 9, 'sms_advert', 'advert', 'sms/advert/index', NULL, 'documentation', 1, 1, '2020-10-24 15:25:15', '2021-02-01 19:26:21');
|
|
|
|
|
INSERT INTO `sys_menu` VALUES (11, '商品管理', 0, 'pms', '/pms', 'Layout', NULL, 'phone', 2, 1, '2020-10-31 10:44:58', '2021-03-25 22:25:01');
|
|
|
|
|
INSERT INTO `sys_menu` VALUES (12, '商品列表', 11, 'pms_product', 'product', 'pms/product/index', NULL, 'component', 1, 1, '2020-11-06 11:54:37', '2021-03-11 20:18:14');
|
|
|
|
|
INSERT INTO `sys_menu` VALUES (13, '订单管理', 0, 'oms', '/oms', 'Layout', NULL, 'shopping', 3, 1, '2020-10-31 10:49:46', '2021-03-02 18:00:08');
|
|
|
|
|
INSERT INTO `sys_menu` VALUES (14, '订单列表', 13, 'oms_order', 'order', 'oms/order', '', 'component', 3, 1, '2020-10-31 10:50:23', '2021-03-25 19:52:05');
|
|
|
|
|
INSERT INTO `sys_menu` VALUES (15, '会员管理', 0, 'ums', '/ums', 'Layout', NULL, 'user', 4, 1, '2020-10-31 10:51:07', '2021-02-06 14:57:13');
|
|
|
|
|
INSERT INTO `sys_menu` VALUES (16, '会员列表', 15, 'ums_user', 'user', 'ums/user/index', NULL, 'peoples', 1, 1, '2020-10-31 10:51:43', '2021-03-02 10:41:56');
|
|
|
|
|
INSERT INTO `sys_menu` VALUES (17, '品牌管理', 11, 'pms_brand', 'brand', 'pms/brand/index', NULL, 'component', 4, 1, '2020-09-23 09:12:21', '2021-02-01 19:25:06');
|
|
|
|
|
INSERT INTO `sys_menu` VALUES (18, '商品分类', 11, 'pms_category', 'category', 'pms/category/index', NULL, 'component', 3, 1, '2020-09-23 09:12:21', '2021-03-17 11:17:06');
|
|
|
|
|
INSERT INTO `sys_menu` VALUES (22, '商品上架', 11, 'pms_product_add', 'product_add', 'pms/product/detail', '', 'component', 2, 1, NULL, '2021-02-19 18:43:23');
|
|
|
|
|
INSERT INTO `sys_menu` VALUES (23, '角色管理', 1, 'system_role', 'role', 'admin/role/index', '', 'peoples', 3, 1, NULL, '2021-03-29 10:44:13');
|
|
|
|
|
INSERT INTO `sys_menu` VALUES (41, '登录记录', 1, 'system_login_record', 'login_record', 'admin/record/login/index', '', 'list', 7, 0, '2021-03-09 09:40:37', '2021-06-06 22:44:20');
|
2021-06-20 00:58:53 +08:00
|
|
|
|
INSERT INTO `sys_menu` VALUES (72, 'test', 17, NULL, '', NULL, '', '', 1, 1, '2021-06-16 11:26:31', '2021-06-16 11:26:31');
|
2021-06-07 01:49:41 +08:00
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Table structure for sys_oauth_client
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `sys_oauth_client`;
|
|
|
|
|
CREATE TABLE `sys_oauth_client` (
|
|
|
|
|
`client_id` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
|
|
|
|
|
`resource_ids` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
|
|
|
|
`client_secret` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
|
|
|
|
`scope` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
|
|
|
|
`authorized_grant_types` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
|
|
|
|
`web_server_redirect_uri` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
|
|
|
|
`authorities` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`access_token_validity` int(0) NULL DEFAULT NULL,
|
|
|
|
|
`refresh_token_validity` int(0) NULL DEFAULT NULL,
|
2021-06-07 01:49:41 +08:00
|
|
|
|
`additional_information` varchar(4096) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
|
|
|
|
`autoapprove` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
|
|
|
|
PRIMARY KEY (`client_id`) USING BTREE
|
|
|
|
|
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
|
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Records of sys_oauth_client
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
INSERT INTO `sys_oauth_client` VALUES ('client', NULL, '123456', 'all', 'authorization_code,password,refresh_token,implicit', NULL, NULL, 3600, 7200, NULL, 'true');
|
2021-06-20 00:58:53 +08:00
|
|
|
|
INSERT INTO `sys_oauth_client` VALUES ('youlai-admin', '', '123456', 'all', 'password,client_credentials,refresh_token,authorization_code', '', '', 3600, 7200, NULL, 'true');
|
2021-06-07 01:49:41 +08:00
|
|
|
|
INSERT INTO `sys_oauth_client` VALUES ('youlai-weapp', '', '123456', 'all', 'authorization_code,password,refresh_token,implicit', NULL, NULL, 3600, 7200, NULL, 'true');
|
2021-05-30 23:42:25 +08:00
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Table structure for sys_permission
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `sys_permission`;
|
|
|
|
|
CREATE TABLE `sys_permission` (
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
2021-05-30 23:42:25 +08:00
|
|
|
|
`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权限名称',
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`menu_id` bigint(0) NULL DEFAULT NULL COMMENT '菜单模块ID\r\n',
|
2021-06-07 01:49:41 +08:00
|
|
|
|
`url_perm` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'URL权限标识',
|
|
|
|
|
`btn_perm` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '按钮权限标识',
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`gmt_create` datetime(0) NULL DEFAULT NULL,
|
|
|
|
|
`gmt_modified` datetime(0) NULL DEFAULT NULL,
|
2021-05-30 23:42:25 +08:00
|
|
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
|
|
|
INDEX `id`(`id`, `name`) USING BTREE,
|
|
|
|
|
INDEX `id_2`(`id`, `name`) USING BTREE
|
2021-06-20 00:58:53 +08:00
|
|
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 80 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '权限表' ROW_FORMAT = Dynamic;
|
2021-05-30 23:42:25 +08:00
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Records of sys_permission
|
|
|
|
|
-- ----------------------------
|
2021-06-20 00:58:53 +08:00
|
|
|
|
INSERT INTO `sys_permission` VALUES (1, '查看用户', 2, 'GET:/answer-admin/api/v1/users/*', 'sys:user:view', '2021-02-02 14:16:07', '2021-06-16 22:25:24');
|
|
|
|
|
INSERT INTO `sys_permission` VALUES (74, '编辑用户', 2, 'PUT:/answer-admin/users/*', 'sys:user:edit', '2021-06-16 16:19:44', '2021-06-16 23:36:53');
|
|
|
|
|
INSERT INTO `sys_permission` VALUES (75, '新增用户', 2, 'POST:/answer-admin/api/v1/users', 'sys:user:add', '2021-06-16 23:36:37', '2021-06-16 23:37:03');
|
|
|
|
|
INSERT INTO `sys_permission` VALUES (76, '删除用户', 2, 'DELETE:/answer-admin/api/v1/users/*', 'sys:user:delete', '2021-06-16 23:43:54', '2021-06-16 23:43:54');
|
|
|
|
|
INSERT INTO `sys_permission` VALUES (78, '23', 2, 'undefined_/undefinedPUT:/answer-admin/users/*', 'PUT:/answer-admin/users/*', '2021-06-17 21:53:44', '2021-06-17 21:53:44');
|
|
|
|
|
INSERT INTO `sys_permission` VALUES (79, '1343', 11, '*_/answer-authundefined', 'sys:user', '2021-06-17 22:12:33', '2021-06-17 22:12:33');
|
2021-05-30 23:42:25 +08:00
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Table structure for sys_role
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `sys_role`;
|
|
|
|
|
CREATE TABLE `sys_role` (
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`id` bigint(0) NOT NULL AUTO_INCREMENT,
|
2021-05-30 23:42:25 +08:00
|
|
|
|
`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '角色名称',
|
|
|
|
|
`code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色编码',
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`sort` int(0) NULL DEFAULT NULL COMMENT '显示顺序',
|
2021-05-30 23:42:25 +08:00
|
|
|
|
`status` tinyint(1) NULL DEFAULT 1 COMMENT '角色状态(0正常 1停用)',
|
|
|
|
|
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除标识 (0未删除 1已删除)',
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`gmt_create` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
|
|
|
|
|
`gmt_modified` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
|
2021-05-30 23:42:25 +08:00
|
|
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
|
|
|
UNIQUE INDEX `name`(`name`) USING BTREE
|
2021-06-20 00:58:53 +08:00
|
|
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 76 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色表' ROW_FORMAT = Dynamic;
|
2021-05-30 23:42:25 +08:00
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Records of sys_role
|
|
|
|
|
-- ----------------------------
|
2021-06-20 00:58:53 +08:00
|
|
|
|
INSERT INTO `sys_role` VALUES (1, '超级管理员', 'ROOT', 1, 1, 0, '2021-05-21 14:56:51', '2018-12-23 16:00:00');
|
|
|
|
|
INSERT INTO `sys_role` VALUES (2, '系统管理员', 'ADMIN', 2, 1, 0, '2021-03-25 12:39:54', '2018-12-23 16:00:00');
|
|
|
|
|
INSERT INTO `sys_role` VALUES (3, '游客', 'GUEST', 3, 1, 0, '2021-05-26 15:49:05', '2019-05-05 16:00:00');
|
|
|
|
|
INSERT INTO `sys_role` VALUES (67, '测试', 'TEST', 1, 1, 0, '2021-06-05 01:30:40', '2021-06-05 01:30:40');
|
2021-05-30 23:42:25 +08:00
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Table structure for sys_role_menu
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `sys_role_menu`;
|
|
|
|
|
CREATE TABLE `sys_role_menu` (
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`role_id` bigint(0) NOT NULL COMMENT '角色ID',
|
|
|
|
|
`menu_id` bigint(0) NOT NULL COMMENT '菜单ID'
|
2021-05-30 23:42:25 +08:00
|
|
|
|
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色和菜单关联表' ROW_FORMAT = Dynamic;
|
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Records of sys_role_menu
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (3, 12);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (3, 1);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (3, 11);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (3, 2);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (3, 6);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (2, 10);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (2, 13);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (2, 14);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (2, 15);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (2, 16);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (2, 23);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (2, 2);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (2, 4);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (2, 6);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (2, 8);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (2, 9);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (3, 4);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (3, 5);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (3, 10);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (3, 14);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (2, 5);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (1, 25);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (3, 8);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (1, 23);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (2, 11);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (2, 12);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (2, 18);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (2, 22);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (1, 2);
|
2021-06-07 01:49:41 +08:00
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (1, 10);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (1, 9);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (1, 11);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (1, 12);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (1, 17);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (1, 18);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (1, 22);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (1, 4);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (1, 41);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (1, 5);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (1, 6);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (1, 8);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (1, 1);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (1, 13);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (1, 14);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (1, 15);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (1, 16);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (1, 26);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (65, 2);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (66, 2);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (67, 23);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (67, 5);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (67, 8);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (2, 17);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (67, 41);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (67, 1);
|
2021-06-20 00:58:53 +08:00
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (67, 2);
|
|
|
|
|
INSERT INTO `sys_role_menu` VALUES (67, 4);
|
2021-05-30 23:42:25 +08:00
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Table structure for sys_role_permission
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `sys_role_permission`;
|
|
|
|
|
CREATE TABLE `sys_role_permission` (
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`role_id` bigint(0) NULL DEFAULT NULL COMMENT '角色id',
|
|
|
|
|
`permission_id` bigint(0) NULL DEFAULT NULL COMMENT '资源id',
|
2021-05-30 23:42:25 +08:00
|
|
|
|
INDEX `role_id`(`role_id`) USING BTREE,
|
|
|
|
|
INDEX `permission_id`(`permission_id`) USING BTREE
|
|
|
|
|
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色权限表' ROW_FORMAT = Dynamic;
|
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Records of sys_role_permission
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
INSERT INTO `sys_role_permission` VALUES (2, 1);
|
2021-06-07 01:49:41 +08:00
|
|
|
|
INSERT INTO `sys_role_permission` VALUES (67, 1);
|
2021-05-30 23:42:25 +08:00
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Table structure for sys_user
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `sys_user`;
|
|
|
|
|
CREATE TABLE `sys_user` (
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`id` bigint(0) NOT NULL AUTO_INCREMENT,
|
2021-05-30 23:42:25 +08:00
|
|
|
|
`username` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名',
|
|
|
|
|
`nickname` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '昵称',
|
|
|
|
|
`gender` tinyint(1) NULL DEFAULT 0 COMMENT '性别',
|
|
|
|
|
`password` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码',
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`dept_id` int(0) NULL DEFAULT NULL COMMENT '部门ID',
|
2021-05-30 23:42:25 +08:00
|
|
|
|
`avatar` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '用户头像',
|
|
|
|
|
`mobile` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系方式',
|
|
|
|
|
`status` tinyint(1) NULL DEFAULT 0 COMMENT '用户状态(0正常 1禁用)',
|
|
|
|
|
`email` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户邮箱',
|
2021-06-07 01:49:41 +08:00
|
|
|
|
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除标识(0未删除 1已删除)',
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`gmt_create` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
|
|
|
|
|
`gmt_modified` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
|
2021-05-30 23:42:25 +08:00
|
|
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
|
|
|
UNIQUE INDEX `login_name`(`username`) USING BTREE
|
2021-06-20 00:58:53 +08:00
|
|
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户信息表' ROW_FORMAT = Dynamic;
|
2021-05-30 23:42:25 +08:00
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Records of sys_user
|
|
|
|
|
-- ----------------------------
|
2021-06-20 00:58:53 +08:00
|
|
|
|
INSERT INTO `sys_user` VALUES (1, 'root', '超级管理员', 2, '$2a$10$P97nHj/AVu6JBVCxmj5qEOwsI7rUhFeyu.DrK4ER7sebzv8jp7R5S', 1, 'https://gitee.com/haoxr/image/raw/master/20210605215800.png', '17621590365', 1, '1490493387@qq.com', 0, '2021-02-10 12:27:30', '2021-06-06 23:36:51');
|
|
|
|
|
INSERT INTO `sys_user` VALUES (2, 'admin', '系统管理员', 1, '$2a$10$yJSqqr6sTxNuYtA6EKcVUe2I4USFCzJ29sNcRrBvtAkSYcNg5ydQ6', 2, 'https://gitee.com/haoxr/image/raw/master/20210605215800.png', '17621210366', 1, '1490493387@qq.com', 0, '2019-10-10 13:41:22', '2021-06-06 23:41:35');
|
|
|
|
|
INSERT INTO `sys_user` VALUES (3, 'test', '测试小用户', 1, '$2a$10$MPJkNw.hKT/fZOgwYP8q9eu/rFJJDsNov697AmdkHNJkpjIpVSw2q', 1, 'https://gitee.com/haoxr/image/raw/master/20210605215800.png', NULL, 1, NULL, 0, '2021-06-05 01:31:29', '2021-06-05 01:31:29');
|
2021-05-30 23:42:25 +08:00
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Table structure for sys_user_role
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `sys_user_role`;
|
|
|
|
|
CREATE TABLE `sys_user_role` (
|
2021-06-20 00:58:53 +08:00
|
|
|
|
`user_id` bigint(0) NOT NULL COMMENT '用户ID',
|
|
|
|
|
`role_id` bigint(0) NOT NULL COMMENT '角色ID',
|
2021-05-30 23:42:25 +08:00
|
|
|
|
PRIMARY KEY (`user_id`, `role_id`) USING BTREE
|
|
|
|
|
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户和角色关联表' ROW_FORMAT = Dynamic;
|
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Records of sys_user_role
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (1, 1);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (2, 1);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (2, 2);
|
2021-06-07 01:49:41 +08:00
|
|
|
|
INSERT INTO `sys_user_role` VALUES (2, 3);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (2, 58);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (2, 59);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (3, 67);
|
2021-05-30 23:42:25 +08:00
|
|
|
|
INSERT INTO `sys_user_role` VALUES (5, 15);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (6, 3);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (6, 18);
|
2021-06-20 00:58:53 +08:00
|
|
|
|
INSERT INTO `sys_user_role` VALUES (6, 67);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (7, 67);
|
2021-05-30 23:42:25 +08:00
|
|
|
|
INSERT INTO `sys_user_role` VALUES (8, 3);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (9, 2);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (10, 26);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (12, 2);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (13, 2);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (17, 1);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (19, 2);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (21, 3);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (21, 15);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (23, 15);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (24, 1);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (25, 14);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (25, 50);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (26, 50);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (31, 15);
|
2021-06-07 01:49:41 +08:00
|
|
|
|
INSERT INTO `sys_user_role` VALUES (32, 1);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (32, 2);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (32, 3);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (32, 56);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (32, 57);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (32, 58);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (33, 2);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (36, 60);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (37, 1);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (38, 1);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (38, 2);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (39, 1);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (39, 2);
|
|
|
|
|
INSERT INTO `sys_user_role` VALUES (40, 60);
|
2021-05-30 23:42:25 +08:00
|
|
|
|
|
|
|
|
|
SET FOREIGN_KEY_CHECKS = 1;
|