@@ -2,7 +2,7 @@ create table "Access"
22(
33 id integer not null
44 primary key ,
5- schema varchar (100 ), default null ,
5+ schema varchar (100 ) default null ,
66 debug integer default 0 not null ,
77 name varchar (50 ) default ' 实际表名,例如 apijson_user' ::character varying not null ,
88 alias text ,
@@ -13,12 +13,35 @@ create table "Access"
1313 post text default ' ["OWNER", "ADMIN"]' ::text not null ,
1414 put text default ' ["OWNER", "ADMIN"]' ::text not null ,
1515 delete text default ' ["OWNER", "ADMIN"]' ::text not null ,
16- date text default CURRENT_TIMESTAMP not null
16+ date text default CURRENT_TIMESTAMP not null ,
17+ detail text default null
1718);
1819
20+ comment on column "Access".id is ' 唯一标识' ;
21+
22+ comment on column "Access".debug is ' 是否为调试表,只允许在开发环境使用,测试和线上环境禁用' ;
23+
24+ comment on column "Access".alias is ' 外部调用的表别名,例如 User' ;
25+
26+ comment on column "Access".get is ' 允许 get 的角色列表,例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]
27+ 用 JSON 类型不能设置默认值,反正权限对应的需求是明确的,也不需要自动转 JSONArray。
28+ TODO: 直接 LOGIN,CONTACT,CIRCLE,OWNER 更简单,反正是开发内部用,不需要复杂查询。' ;
29+
30+ comment on column "Access".head is ' 允许 head 的角色列表,例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]' ;
31+
32+ comment on column "Access".gets is ' 允许 gets 的角色列表,例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]' ;
33+
34+ comment on column "Access".heads is ' 允许 heads 的角色列表,例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]' ;
35+
36+ comment on column "Access".post is ' 允许 post 的角色列表,例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]' ;
37+
38+ comment on column "Access".put is ' 允许 put 的角色列表,例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]' ;
1939
2040comment on column "Access".delete is ' 允许 delete 的角色列表,例如 ["LOGIN", "CONTACT", "CIRCLE", "OWNER"]' ;
2141
42+ comment on column "Access".date is ' 创建时间' ;
43+
44+
2245alter table " Access"
2346 owner to postgres;
2447
0 commit comments