2022-08-17 18:14:49 +08:00
|
|
|
/*
|
|
|
|
Navicat Premium Data Transfer
|
|
|
|
|
|
|
|
Source Server : mysql57
|
|
|
|
Source Server Type : MySQL
|
|
|
|
Source Server Version : 50732
|
|
|
|
Source Host : 127.0.0.1:3306
|
|
|
|
Source Schema : zyjblogs_rbac
|
|
|
|
|
|
|
|
Target Server Type : MySQL
|
|
|
|
Target Server Version : 50732
|
|
|
|
File Encoding : 65001
|
|
|
|
|
2022-08-18 18:52:02 +08:00
|
|
|
Date: 18/08/2022 18:47:42
|
2022-08-17 18:14:49 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
SET NAMES utf8mb4;
|
|
|
|
SET FOREIGN_KEY_CHECKS = 0;
|
|
|
|
|
2022-08-18 18:52:02 +08:00
|
|
|
-- ----------------------------
|
|
|
|
-- Table structure for oauth_access_token
|
|
|
|
-- ----------------------------
|
|
|
|
DROP TABLE IF EXISTS `oauth_access_token`;
|
|
|
|
CREATE TABLE `oauth_access_token` (
|
|
|
|
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
|
|
`token_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
|
|
|
`token` blob NULL,
|
|
|
|
`authentication_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
|
|
|
`user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
|
|
|
`client_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
|
|
|
`authentication` blob NULL,
|
|
|
|
`refresh_token` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
|
|
|
UNIQUE INDEX `authentication_id`(`authentication_id`) USING BTREE,
|
|
|
|
INDEX `token_id_index`(`token_id`) USING BTREE,
|
|
|
|
INDEX `authentication_id_index`(`authentication_id`) USING BTREE,
|
|
|
|
INDEX `user_name_index`(`user_name`) USING BTREE,
|
|
|
|
INDEX `client_id_index`(`client_id`) USING BTREE,
|
|
|
|
INDEX `refresh_token_index`(`refresh_token`) USING BTREE
|
|
|
|
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
-- Records of oauth_access_token
|
|
|
|
-- ----------------------------
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
-- Table structure for oauth_client_details
|
|
|
|
-- ----------------------------
|
|
|
|
DROP TABLE IF EXISTS `oauth_client_details`;
|
|
|
|
CREATE TABLE `oauth_client_details` (
|
|
|
|
`client_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
|
|
|
|
`resource_ids` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
|
|
|
`client_secret` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
|
|
|
`scope` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
|
|
|
`authorized_grant_types` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
|
|
|
`web_server_redirect_uri` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
|
|
|
`authorities` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
|
|
|
`access_token_validity` int(11) NULL DEFAULT NULL,
|
|
|
|
`refresh_token_validity` int(11) NULL DEFAULT NULL,
|
|
|
|
`additional_information` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
|
|
|
|
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
|
|
`archived` tinyint(1) NULL DEFAULT 0,
|
|
|
|
`trusted` tinyint(1) NULL DEFAULT 0,
|
|
|
|
`autoapprove` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'false',
|
|
|
|
PRIMARY KEY (`client_id`) USING BTREE
|
|
|
|
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
-- Records of oauth_client_details
|
|
|
|
-- ----------------------------
|
|
|
|
INSERT INTO `oauth_client_details` VALUES ('zyjblogs-gateway', 'zyjblogs-gateway', '$2a$10$Wk2w4OX5DpFgG3rBuhPnnulCSOIuU3TZhpWjaOq39LZnL.p0LJila', 'all', 'authorization_code,password,client_credentials,implicit,refresh_token', 'http://localhost:9019/', NULL, NULL, NULL, NULL, '2022-08-18 14:13:53', 0, 0, 'false');
|
|
|
|
INSERT INTO `oauth_client_details` VALUES ('zyjblogs-oauth', 'zyjblogs-oauth', '$2a$10$Wk2w4OX5DpFgG3rBuhPnnulCSOIuU3TZhpWjaOq39LZnL.p0LJila', 'all', 'authorization_code,password,client_credentials,implicit,refresh_token', 'http://localhost:9019/', NULL, NULL, NULL, NULL, '2022-08-18 14:14:32', 0, 0, 'false');
|
|
|
|
INSERT INTO `oauth_client_details` VALUES ('zyjblogs-rbac', 'zyjblogs-rbac', '$2a$10$Wk2w4OX5DpFgG3rBuhPnnulCSOIuU3TZhpWjaOq39LZnL.p0LJila', 'all', 'authorization_code,password,client_credentials,implicit,refresh_token', 'http://localhost:9029/', NULL, NULL, NULL, NULL, '2022-08-18 08:34:24', 0, 0, 'false');
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
-- Table structure for oauth_code
|
|
|
|
-- ----------------------------
|
|
|
|
DROP TABLE IF EXISTS `oauth_code`;
|
|
|
|
CREATE TABLE `oauth_code` (
|
|
|
|
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
|
|
`code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
|
|
|
`authentication` blob NULL,
|
|
|
|
INDEX `code_index`(`code`) USING BTREE
|
|
|
|
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
-- Records of oauth_code
|
|
|
|
-- ----------------------------
|
|
|
|
INSERT INTO `oauth_code` VALUES ('2022-08-18 09:01:55', 'AeocBw', 0xACED0005737200416F72672E737072696E676672616D65776F726B2E73656375726974792E6F61757468322E70726F76696465722E4F417574683241757468656E7469636174696F6EBD400B02166252130200024C000D73746F7265645265717565737474003C4C6F72672F737072696E676672616D65776F726B2F73656375726974792F6F61757468322F70726F76696465722F4F4175746832526571756573743B4C00127573657241757468656E7469636174696F6E7400324C6F72672F737072696E676672616D65776F726B2F73656375726974792F636F72652F41757468656E7469636174696F6E3B787200476F72672E737072696E676672616D65776F726B2E73656375726974792E61757468656E7469636174696F6E2E416273747261637441757468656E7469636174696F6E546F6B656ED3AA287E6E47640E0200035A000D61757468656E746963617465644C000B617574686F7269746965737400164C6A6176612F7574696C2F436F6C6C656374696F6E3B4C000764657461696C737400124C6A6176612F6C616E672F4F626A6563743B787000737200266A6176612E7574696C2E436F6C6C656374696F6E7324556E6D6F6469666961626C654C697374FC0F2531B5EC8E100200014C00046C6973747400104C6A6176612F7574696C2F4C6973743B7872002C6A6176612E7574696C2E436F6C6C656374696F6E7324556E6D6F6469666961626C65436F6C6C656374696F6E19420080CB5EF71E0200014C00016371007E00047870737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A657870000000007704000000007871007E000C707372003A6F72672E737072696E676672616D65776F726B2E73656375726974792E6F61757468322E70726F76696465722E4F41757468325265717565737400000000000000010200075A0008617070726F7665644C000B617574686F72697469657371007E00044C000A657874656E73696F6E7374000F4C6A6176612F7574696C2F4D61703B4C000B72656469726563745572697400124C6A6176612F6C616E672F537472696E673B4C00077265667265736874003B4C6F72672F737072696E676672616D65776F726B2F73656375726974792F6F61757468322F70726F76696465722F546F6B656E526571756573743B4C000B7265736F7572636549647374000F4C6A6176612F7574696C2F5365743B4C000D726573706F6E7365547970657371007E0011787200386F72672E737072696E676672616D65776F726B2E73656375726974792E6F61757468322E70726F76696465722E426173655265717565737436287A3EA37169BD0200034C0008636C69656E74496471007E000F4C001172657175657374506172616D657465727371007E000E4C000573636F706571007E0011787074000D7A796A626C6F67732D72626163737200256A6176612E7574696C2E436F6C6C656374696F6E7324556E6D6F6469666961626C654D6170F1A5A8FE74F507420200014C00016D71007E000E7870737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F400000000000067708000000080000000474000D726573706F6E73655F74797065740004636F6465740009636C69656E745F696471007E001474000C72656469726563745F75726C74001568747470733A2F2F7777772E62616964752E636F6D74000573636F7065740003616C6C78737200256A6176612E7574696C2E436F6C6C656374696F6E7324556E6D6F6469666961626C65536574801D92D18F9B80550200007871007E0009737200176A6176612E7574696C2E4C696E6B656448617368536574D86CD75A95DD2A1E020000787200116A6176612E7574696C2E48617368536574BA44859596B8B7340300007870770C000000103F4000000000000171007E001F78017371007E0023770C000000103F40000000000000787371007E00173F400000000000007708000000100000000078740016687474703A2F2F6C6F63616C686F73743A393032392F707371007E0023770C000000103F4000000000000174000D7A796A626C6F67732D72626163787371007E0023770C000000103F4000000000000171007E001A787372004F6F72672E737072696E676672616D65776F726B2E73656375726974792E61757468656E7469636174696F6E2E557365726E616D6550617373776F726441757468656E7469636174696F6E546F6B656E00000000000002120200024C000B63726564656E7469616C7371007E00054C00097072696E636970616C71007E00057871007E0003017372001F6A6176612E7574696C2E436F6C6C656374696F6E7324456D7074794C6973747AB817B43CA79EDE0200007870737200486F72672E737072696E676672616D65776F726B2E73656375726974792E7765622E61757468656E7469636174696F6E2E57656241757468656E7469636174696F6E44657461696C7300000000000002120200024C000D72656D6F74654164647265737371007E000F4C000973657373696F6E496471007E000F78707400093132372E302E302E3174002038373032444535373930443133444133363839453433354436434139444143367073720031636E2E7A796A626C6F67732E6F617574682E7365727665722E757365722E706F2E4F617574685573657244657461696C739ABCC249D9EA599302000E5A00116163636F756E744E6
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
-- Table structure for oauth_refresh_token
|
|
|
|
-- ----------------------------
|
|
|
|
DROP TABLE IF EXISTS `oauth_refresh_token`;
|
|
|
|
CREATE TABLE `oauth_refresh_token` (
|
|
|
|
`create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
|
|
`token_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
|
|
|
`token` blob NULL,
|
|
|
|
`authentication` blob NULL,
|
|
|
|
INDEX `token_id_index`(`token_id`) USING BTREE
|
|
|
|
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
-- Records of oauth_refresh_token
|
|
|
|
-- ----------------------------
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
-- Table structure for user
|
|
|
|
-- ----------------------------
|
2022-08-17 23:55:32 +08:00
|
|
|
DROP TABLE IF EXISTS `user`;
|
2022-08-18 18:52:02 +08:00
|
|
|
CREATE TABLE `user` (
|
|
|
|
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户id',
|
|
|
|
`username` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户名',
|
|
|
|
`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '昵称',
|
|
|
|
`age` int(11) NULL DEFAULT NULL COMMENT '用户年龄',
|
|
|
|
`avatar` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像',
|
|
|
|
`password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户密码',
|
|
|
|
`phone` int(11) NULL DEFAULT NULL COMMENT '用户密码',
|
|
|
|
`email` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱',
|
|
|
|
`invite_user_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邀请者id',
|
|
|
|
`status` int(11) NULL DEFAULT NULL COMMENT '用户状态 1启用 0注销',
|
|
|
|
`follow_num` int(11) NULL DEFAULT NULL COMMENT '关注数量',
|
|
|
|
`fans_num` int(11) NULL DEFAULT NULL COMMENT '粉丝数量',
|
|
|
|
`deleted` tinyint(4) NULL DEFAULT 0,
|
|
|
|
`description` varchar(600) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户介绍',
|
|
|
|
`create_user_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建用户id',
|
|
|
|
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
|
|
|
|
`update_user_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新用户id',
|
|
|
|
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
|
|
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
|
|
UNIQUE INDEX `username`(`username`) USING BTREE
|
|
|
|
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
-- Records of user
|
|
|
|
-- ----------------------------
|
|
|
|
INSERT INTO `user` VALUES ('1', 'admin', 'admin', 1, NULL, '$2a$10$4DlfvZrq7zgKzkbKyg.GHO6yHdGnozcaf3B5JSAC0fNB4k1GhMk6y', NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL);
|
2022-08-17 23:55:32 +08:00
|
|
|
|
2022-08-17 18:14:49 +08:00
|
|
|
SET FOREIGN_KEY_CHECKS = 1;
|