Skip to content

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ộtKiểuKhoáMô tả
codetextNOT NULLPK
decision_reftextNOT NULL
titletextNOT NULL
descriptiontextNOT NULL
created_attimestamptzNOT 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ộtKiểuKhoáMô tả
iduuidNOT NULLPK
kindtextNOT NULLFK → finance_policy_kinds
version_nointegerNOT NULL
statustextNOT NULL
bodyjsonb
effective_fromtimestamptz
effective_totimestamptz
source_reftextReference of the owner decision being recorded (register/minutes id). Required to submit; never invented.
created_byuuidNOT NULLFK → accounts
created_attimestamptzNOT NULL
updated_byuuidNOT NULLFK → accounts
updated_attimestamptzNOT NULL
submitted_byuuidFK → accounts
submitted_attimestamptz
payload_hashbytea
approved_byuuidFK → accounts
approved_attimestamptz
versionintegerNOT NULL
correlation_idcorrelation_refNOT NULL

Khoá chính: id

Trỏ ra (5):

  • approved_by → accounts · ON DELETE RESTRICT
  • created_by → accounts · ON DELETE RESTRICT
  • kind → finance_policy_kinds · ON DELETE RESTRICT
  • submitted_by → accounts · ON DELETE RESTRICT
  • updated_by → accounts · ON DELETE RESTRICT

Được trỏ tới (1): vouchers

Sinh từ ad83b0aea · 820 migration · PostgreSQL 17