完善登录逻辑,登录接口统一到 /token
This commit is contained in:
@@ -179,20 +179,21 @@ comment on column user_role.deleted_at is '删除时间';
|
||||
|
||||
drop table if exists client cascade;
|
||||
create table client (
|
||||
id serial primary key,
|
||||
client_id varchar(255) not null unique,
|
||||
client_secret varchar(255) not null,
|
||||
redirect_uri varchar(255),
|
||||
grant_code bool not null default false,
|
||||
grant_client bool not null default false,
|
||||
grant_refresh bool not null default false,
|
||||
spec int not null,
|
||||
name varchar(255) not null,
|
||||
icon varchar(255),
|
||||
status int not null default 1,
|
||||
created_at timestamp default current_timestamp,
|
||||
updated_at timestamp default current_timestamp,
|
||||
deleted_at timestamp
|
||||
id serial primary key,
|
||||
client_id varchar(255) not null unique,
|
||||
client_secret varchar(255) not null,
|
||||
redirect_uri varchar(255),
|
||||
grant_code bool not null default false,
|
||||
grant_client bool not null default false,
|
||||
grant_refresh bool not null default false,
|
||||
grant_password bool not null default false,
|
||||
spec int not null,
|
||||
name varchar(255) not null,
|
||||
icon varchar(255),
|
||||
status int not null default 1,
|
||||
created_at timestamp default current_timestamp,
|
||||
updated_at timestamp default current_timestamp,
|
||||
deleted_at timestamp
|
||||
);
|
||||
|
||||
create index client_client_id_index on client (client_id);
|
||||
@@ -209,6 +210,7 @@ comment on column client.redirect_uri is 'OAuth2 重定向URI';
|
||||
comment on column client.grant_code is '允许授权码授予';
|
||||
comment on column client.grant_client is '允许客户端凭证授予';
|
||||
comment on column client.grant_refresh is '允许刷新令牌授予';
|
||||
comment on column client.grant_password is '允许密码授予';
|
||||
comment on column client.spec is '安全规范:0-web,1-native,2-browser';
|
||||
comment on column client.name is '名称';
|
||||
comment on column client.icon is '图标URL';
|
||||
@@ -822,19 +824,19 @@ comment on column bill.deleted_at is '删除时间';
|
||||
-- coupon 优惠券
|
||||
drop table if exists coupon cascade;
|
||||
create table coupon (
|
||||
id serial primary key,
|
||||
user_id int references "user" (id)
|
||||
id serial primary key,
|
||||
user_id int references "user" (id)
|
||||
on update cascade
|
||||
on delete cascade,
|
||||
code varchar(255) not null unique,
|
||||
remark varchar(255),
|
||||
amount decimal(12, 2) not null default 0,
|
||||
code varchar(255) not null unique,
|
||||
remark varchar(255),
|
||||
amount decimal(12, 2) not null default 0,
|
||||
min_amount decimal(12, 2) not null default 0,
|
||||
status int not null default 0,
|
||||
expire_at timestamp,
|
||||
created_at timestamp default current_timestamp,
|
||||
updated_at timestamp default current_timestamp,
|
||||
deleted_at timestamp
|
||||
status int not null default 0,
|
||||
expire_at timestamp,
|
||||
created_at timestamp default current_timestamp,
|
||||
updated_at timestamp default current_timestamp,
|
||||
deleted_at timestamp
|
||||
);
|
||||
create index coupon_user_id_index on coupon (user_id);
|
||||
create index coupon_code_index on coupon (code);
|
||||
|
||||
Reference in New Issue
Block a user