三方登录:支持 saas 多租户配置

This commit is contained in:
YunaiV
2023-11-04 22:10:58 +08:00
parent f353011d96
commit 77e98bbb2d
26 changed files with 759 additions and 44 deletions

View File

@@ -354,8 +354,25 @@ CREATE TABLE IF NOT EXISTS "system_error_code" (
PRIMARY KEY ("id")
) COMMENT '错误码表';
CREATE TABLE IF NOT EXISTS "system_social_client" (
"id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
"name" varchar(255) NOT NULL,
"social_type" int NOT NULL,
"user_type" int NOT NULL,
"client_id" varchar(255) NOT NULL,
"client_secret" varchar(255) NOT NULL,
"status" int NOT NULL,
"creator" varchar(64) DEFAULT '',
"create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
"updater" varchar(64) DEFAULT '',
"update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
"deleted" bit NOT NULL DEFAULT FALSE,
"tenant_id" bigint NOT NULL,
PRIMARY KEY ("id")
) COMMENT '社交客户端表';
CREATE TABLE IF NOT EXISTS "system_social_user" (
"id" number NOT NULL GENERATED BY DEFAULT AS IDENTITY,
"id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
"type" tinyint NOT NULL,
"openid" varchar(64) NOT NULL,
"token" varchar(256) DEFAULT NULL,
@@ -374,7 +391,7 @@ CREATE TABLE IF NOT EXISTS "system_social_user" (
) COMMENT '社交用户';
CREATE TABLE IF NOT EXISTS "system_social_user_bind" (
"id" number NOT NULL GENERATED BY DEFAULT AS IDENTITY,
"id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
"user_id" bigint NOT NULL,
"user_type" tinyint NOT NULL,
"social_type" tinyint NOT NULL,