From 5aade85399c342a18b943a6c44ba71b4f4344b78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E6=B2=90?= Date: Wed, 9 Aug 2023 23:22:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0SQL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/postgresql/maku.sql | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/db/postgresql/maku.sql b/db/postgresql/maku.sql index a6d02f8..3bd18f2 100644 --- a/db/postgresql/maku.sql +++ b/db/postgresql/maku.sql @@ -42,6 +42,29 @@ COMMENT ON COLUMN sys_user.updater IS '更新者'; COMMENT ON COLUMN sys_user.update_time IS '更新时间'; +CREATE TABLE sys_user_token +( + id bigserial NOT NULL, + user_id int8, + access_token varchar(50) NOT NULL, + access_token_expire timestamp, + refresh_token varchar(50) NOT NULL, + refresh_token_expire timestamp, + tenant_id int8, + primary key (id) +); + +COMMENT ON TABLE sys_user_token IS '用户管理'; +COMMENT ON COLUMN sys_user_token.id IS 'id'; +COMMENT ON COLUMN sys_user_token.user_id IS '用户ID'; +COMMENT ON COLUMN sys_user_token.access_token IS 'accessToken'; +COMMENT ON COLUMN sys_user_token.access_token_expire IS 'accessToken 过期时'; +COMMENT ON COLUMN sys_user_token.refresh_token IS 'refreshToken'; +COMMENT ON COLUMN sys_user_token.refresh_token_expire IS 'refreshToken 过期时间'; +COMMENT ON COLUMN sys_user_token.tenant_id IS '租户ID'; +COMMENT ON COLUMN sys_user_token.create_time IS '创建时间'; + + CREATE TABLE sys_org ( id bigserial NOT NULL, @@ -76,6 +99,7 @@ create table sys_role ( id bigserial NOT NULL, name varchar(50), + role_code varchar(50), remark varchar(100), data_scope int, org_id int8, @@ -92,6 +116,7 @@ create table sys_role COMMENT ON TABLE sys_role IS '角色管理'; COMMENT ON COLUMN sys_role.id IS 'id'; COMMENT ON COLUMN sys_role.name IS '角色名称'; +COMMENT ON COLUMN sys_role.role_code IS '角色编码'; COMMENT ON COLUMN sys_role.remark IS '备注'; COMMENT ON COLUMN sys_role.data_scope IS '数据范围 0:全部数据 1:本机构及子机构数据 2:本机构数据 3:本人数据 4:自定义数据'; COMMENT ON COLUMN sys_role.org_id IS '机构ID';