docs: update env workflow and role_code contracts
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
## 4) roles
|
||||
- `id` UUID PK default `gen_random_uuid()`
|
||||
- `role_key` TEXT NOT NULL UNIQUE
|
||||
- `role_code` TEXT NOT NULL(語意代碼,建議格式:`<system>:<module>:<action>`,例如 `mkt:marketing_card:edit`)
|
||||
- `system_id` UUID NOT NULL FK -> `systems(id)` ON DELETE CASCADE
|
||||
- `name` TEXT NOT NULL
|
||||
- `description` TEXT
|
||||
@@ -41,6 +42,7 @@
|
||||
- `created_at` TIMESTAMPTZ NOT NULL default `now()`
|
||||
- `updated_at` TIMESTAMPTZ NOT NULL default `now()`
|
||||
- UNIQUE(`system_id`, `name`)
|
||||
- UNIQUE(`system_id`, `role_code`)
|
||||
|
||||
## 5) site_roles
|
||||
- `id` UUID PK default `gen_random_uuid()`
|
||||
|
||||
Reference in New Issue
Block a user