Giao diện
payment / finance
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 payment.
finance_policy_kinds
P3-07. Catalog of Finance policy kinds (migration-seeded). Each kind is bound to the register question that decides it; the catalog carries no policy value.
public.finance_policy_kinds · 5 cột · 2 check · 1 unique · 2 index · 1 policy · 2 trigger · RLS bật
| Cột | Kiểu | Khoá | Mô tả | |
|---|---|---|---|---|
code | text | NOT NULL | PK | |
decision_ref | text | NOT NULL | ||
title | text | NOT NULL | ||
description | text | NOT NULL | ||
created_at | timestamptz | NOT NULL |
Khoá chính: code
Trỏ ra: không có
Được trỏ tới (1): finance_policy_versions
finance_policy_versions
P3-07. VERSIONED_ROWS (G-FIN). UNDECIDED/INTERIM/APPROVED; maker/checker approval; APPROVED immutable except a set-once, non-retroactive close of an open window by its successor. Nothing approved is seeded.
public.finance_policy_versions · 19 cột · 9 check · 1 unique · 4 index · 1 policy · 4 trigger · RLS bật
| Cột | Kiểu | Khoá | Mô tả | |
|---|---|---|---|---|
id | uuid | NOT NULL | PK | |
kind | text | NOT NULL | FK → finance_policy_kinds | |
version_no | integer | NOT NULL | ||
status | text | NOT NULL | ||
body | jsonb | |||
effective_from | timestamptz | |||
effective_to | timestamptz | |||
source_ref | text | Reference of the owner decision being recorded (register/minutes id). Required to submit; never invented. | ||
created_by | uuid | NOT NULL | FK → accounts | |
created_at | timestamptz | NOT NULL | ||
updated_by | uuid | NOT NULL | FK → accounts | |
updated_at | timestamptz | NOT NULL | ||
submitted_by | uuid | FK → accounts | ||
submitted_at | timestamptz | |||
payload_hash | bytea | |||
approved_by | uuid | FK → accounts | ||
approved_at | timestamptz | |||
version | integer | NOT NULL | ||
correlation_id | correlation_ref | NOT NULL |
Khoá chính: id
Trỏ ra (5):
approved_by→accounts·ON DELETE RESTRICTcreated_by→accounts·ON DELETE RESTRICTkind→finance_policy_kinds·ON DELETE RESTRICTsubmitted_by→accounts·ON DELETE RESTRICTupdated_by→accounts·ON DELETE RESTRICT
Được trỏ tới (1): vouchers