Giao diện
content_report / cms
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 đè.
5 bảng. Quay lại content_report.
cms_articles
P4-17. CMS article aggregate: slug, status, draft-head and published version pointers, schedule, soft delete.
public.cms_articles · 18 cột · 9 check · 0 unique · 3 index · 3 policy · 8 trigger · RLS bật
| Cột | Kiểu | Khoá | Mô tả | |
|---|---|---|---|---|
id | uuid | NOT NULL | PK FK → content_versions | |
slug | text | NOT NULL | ||
locale | text | NOT NULL | ||
status | text | NOT NULL | ||
latest_version_no | integer | NOT NULL | ||
published_version_no | integer | FK → content_versions | ||
publish_at | timestamptz | |||
published_at | timestamptz | |||
published_by | uuid | FK → accounts | ||
unpublished_at | timestamptz | |||
unpublished_by | uuid | FK → accounts | ||
created_by | uuid | NOT NULL | FK → accounts | |
updated_by | uuid | NOT NULL | FK → accounts | |
created_at | timestamptz | NOT NULL | ||
updated_at | timestamptz | NOT NULL | ||
version | integer | NOT NULL | ||
deleted_at | timestamptz | |||
deleted_by | uuid | FK → accounts |
Khoá chính: id
Trỏ ra (6):
created_by→accounts·ON DELETE RESTRICTdeleted_by→accounts·ON DELETE RESTRICTpublished_by→accounts·ON DELETE RESTRICTid, published_version_no→content_versions·ON DELETE RESTRICTunpublished_by→accounts·ON DELETE RESTRICTupdated_by→accounts·ON DELETE RESTRICT
Được trỏ tới (2): content_versions, content_versions
cms_categories
P4-17. CMS article category tree (A-CMS-06): unique slug, acyclic parent, active flag, version, no delete.
public.cms_categories · 11 cột · 5 check · 1 unique · 3 index · 3 policy · 5 trigger · RLS bật
| Cột | Kiểu | Khoá | Mô tả | |
|---|---|---|---|---|
id | uuid | NOT NULL | PK | |
name | text | NOT NULL | ||
slug | text | NOT NULL | ||
description | text | |||
parent_id | uuid | FK → cms_categories | ||
is_active | boolean | NOT NULL | ||
created_by | uuid | NOT NULL | FK → accounts | |
updated_by | uuid | NOT NULL | FK → accounts | |
created_at | timestamptz | NOT NULL | ||
updated_at | timestamptz | NOT NULL | ||
version | integer | NOT NULL |
Khoá chính: id
Trỏ ra (3):
created_by→accounts·ON DELETE RESTRICTparent_id→cms_categories·ON DELETE RESTRICTupdated_by→accounts·ON DELETE RESTRICT
Được trỏ tới (2): cms_categories, content_versions
cms_pages
FU-CMS GAP-351. CMS content page aggregate: key (slug), status, draft-head and published version pointers, schedule.
public.cms_pages · 16 cột · 7 check · 0 unique · 3 index · 3 policy · 7 trigger · RLS bật
| Cột | Kiểu | Khoá | Mô tả | |
|---|---|---|---|---|
id | uuid | NOT NULL | PK FK → content_versions | |
slug | text | NOT NULL | ||
locale | text | NOT NULL | ||
status | text | NOT NULL | ||
latest_version_no | integer | NOT NULL | ||
published_version_no | integer | FK → content_versions | ||
publish_at | timestamptz | |||
published_at | timestamptz | |||
published_by | uuid | FK → accounts | ||
unpublished_at | timestamptz | |||
unpublished_by | uuid | FK → accounts | ||
created_by | uuid | NOT NULL | FK → accounts | |
updated_by | uuid | NOT NULL | FK → accounts | |
created_at | timestamptz | NOT NULL | ||
updated_at | timestamptz | NOT NULL | ||
version | integer | NOT NULL |
Khoá chính: id
Trỏ ra (5):
created_by→accounts·ON DELETE RESTRICTpublished_by→accounts·ON DELETE RESTRICTid, published_version_no→content_versions·ON DELETE RESTRICTunpublished_by→accounts·ON DELETE RESTRICTupdated_by→accounts·ON DELETE RESTRICT
Được trỏ tới (2): content_versions, content_versions
cms_banners
P4-17. CMS banner aggregate: status, draft-head and published version pointers, hide marker. No delete.
public.cms_banners · 13 cột · 5 check · 0 unique · 2 index · 3 policy · 7 trigger · RLS bật
| Cột | Kiểu | Khoá | Mô tả | |
|---|---|---|---|---|
id | uuid | NOT NULL | PK FK → content_versions | |
status | text | NOT NULL | ||
latest_version_no | integer | NOT NULL | ||
published_version_no | integer | FK → content_versions | ||
published_at | timestamptz | |||
published_by | uuid | FK → accounts | ||
hidden_at | timestamptz | |||
hidden_by | uuid | FK → accounts | ||
created_by | uuid | NOT NULL | FK → accounts | |
updated_by | uuid | NOT NULL | FK → accounts | |
created_at | timestamptz | NOT NULL | ||
updated_at | timestamptz | NOT NULL | ||
version | integer | NOT NULL |
Khoá chính: id
Trỏ ra (5):
created_by→accounts·ON DELETE RESTRICThidden_by→accounts·ON DELETE RESTRICTpublished_by→accounts·ON DELETE RESTRICTid, published_version_no→content_versions·ON DELETE RESTRICTupdated_by→accounts·ON DELETE RESTRICT
Được trỏ tới (1): content_versions
cms_keywords
P4-17. CMS keywords (A-CMS-07): live-unique normalized slug, rename keeps id, soft delete only when unused.
public.cms_keywords · 10 cột · 4 check · 0 unique · 2 index · 3 policy · 6 trigger · RLS bật
| Cột | Kiểu | Khoá | Mô tả | |
|---|---|---|---|---|
id | uuid | NOT NULL | PK | |
name | text | NOT NULL | ||
normalized_keyword | text | NOT NULL | ||
created_by | uuid | NOT NULL | FK → accounts | |
updated_by | uuid | NOT NULL | FK → accounts | |
created_at | timestamptz | NOT NULL | ||
updated_at | timestamptz | NOT NULL | ||
version | integer | NOT NULL | ||
deleted_at | timestamptz | |||
deleted_by | uuid | FK → accounts |
Khoá chính: id
Trỏ ra (3):
created_by→accounts·ON DELETE RESTRICTdeleted_by→accounts·ON DELETE RESTRICTupdated_by→accounts·ON DELETE RESTRICT
Được trỏ tới: không có