Giao diện
identity / legal
Trang sinh tự động
Sinh từ ad83b0aea — chạy 820 migration lên PostgreSQL 17 rồi đọc pg_catalog. Mô tả bảng và cột lấy từ COMMENT ON. Không sửa tay: lần chạy docgen sau sẽ ghi đè.
2 bảng. Quay lại identity.
legal_holds
P1-14. Legal holds on a subject (account or order owner). ACTIVE blocks erasure and purge. Never deleted.
public.legal_holds · 16 cột · 9 check · 1 unique · 3 index · 1 policy · 6 trigger · RLS bật
| Cột | Kiểu | Khoá | Mô tả | |
|---|---|---|---|---|
id | uuid | NOT NULL | PK | |
scope_kind | text | NOT NULL | ||
account_id | uuid | NOT NULL | FK → accounts | |
order_id | uuid | |||
reason | text | NOT NULL | ||
status | text | NOT NULL | ||
set_by | uuid | NOT NULL | FK → accounts | |
set_at | timestamptz | NOT NULL | ||
released_by | uuid | FK → accounts | ||
released_at | timestamptz | |||
release_reason | text | |||
request_id | text | NOT NULL | ||
correlation_id | correlation_ref | NOT NULL | ||
created_at | timestamptz | NOT NULL | ||
updated_at | timestamptz | NOT NULL | ||
version | integer | NOT NULL |
Khoá chính: id
Trỏ ra (3):
account_id→accounts·ON DELETE RESTRICTreleased_by→accounts·ON DELETE RESTRICTset_by→accounts·ON DELETE RESTRICT
Được trỏ tới (1): legal_hold_events
legal_hold_events
P1-14. Append-only set/release history of legal holds (actor, reason), written by trigger only.
public.legal_hold_events · 7 cột · 1 check · 1 unique · 2 index · 0 policy · 2 trigger · RLS bật
| Cột | Kiểu | Khoá | Mô tả | |
|---|---|---|---|---|
id | bigint | NOT NULL | PK | |
hold_id | uuid | NOT NULL | FK → legal_holds | |
version | integer | NOT NULL | ||
kind | text | NOT NULL | ||
actor_account_id | uuid | NOT NULL | ||
reason | text | NOT NULL | ||
recorded_at | timestamptz | NOT NULL |
Khoá chính: id
Trỏ ra (1):
hold_id→legal_holds·ON DELETE RESTRICT
Được trỏ tới: không có