c22669c31d
- 新增迁移 000031-000034(登录日志/角色/模型配额/记忆) - 新增包: license/memory/modelquota/assistant,扫描引擎 - 全部功能后端+前端+端到端验证通过(25 包单测)
15 lines
646 B
SQL
15 lines
646 B
SQL
-- 自定义角色管理:在内置角色(superadmin/operator/auditor/member)之外,
|
|
-- 管理员可定义任意角色并为其分配权限字符串;绑定账号时权限展开写入
|
|
-- 账号 permissions(与内置角色权限合并生效)。
|
|
CREATE TABLE IF NOT EXISTS gateway.roles (
|
|
id uuid PRIMARY KEY,
|
|
code text NOT NULL UNIQUE,
|
|
name text NOT NULL,
|
|
description text NOT NULL DEFAULT '',
|
|
permissions text[] NOT NULL DEFAULT '{}',
|
|
builtin boolean NOT NULL DEFAULT false,
|
|
created_by uuid,
|
|
created_at timestamptz NOT NULL DEFAULT clock_timestamp(),
|
|
updated_at timestamptz NOT NULL DEFAULT clock_timestamp()
|
|
);
|