Giao diện
pipoint / rank_adjustments
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 đè.
1 bảng. Quay lại pipoint.
rank_adjustments
PPI-P5-07 (W-03 b). Maker/checker rank-only debit of a customer: never sent to PiPoint, no point_requests row. APPROVED writes one SIGNED rank_debits row (source_rank_adjustment_id). No delete; decided rows never change.
public.rank_adjustments · 18 cột · 10 check · 0 unique · 5 index · 1 policy · 6 trigger · RLS bật
| Cột | Kiểu | Khoá | Mô tả | |
|---|---|---|---|---|
id | uuid | NOT NULL | PK | |
account_id | uuid | NOT NULL | FK → accounts | |
points | integer | NOT NULL | ||
reason_code | text | NOT NULL | ||
reason_text | text | NOT NULL | ||
evidence_media_ids | uuid[] | NOT NULL | ||
source_adjustment_id | uuid | FK → point_adjustments | ||
payload_hash | bytea | NOT NULL | ||
status | text | NOT NULL | ||
requested_by | uuid | FK → accounts | PPI-P5-07 maker (operations, F-06). NULL = made by the system for a refused return-recall slip (PPI-P5-09, E-09d). | |
requested_at | timestamptz | NOT NULL | ||
decided_by | uuid | FK → accounts | ||
decided_at | timestamptz | |||
decision_note | text | |||
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 (4):
account_id→accounts·ON DELETE RESTRICTdecided_by→accounts·ON DELETE RESTRICTrequested_by→accounts·ON DELETE RESTRICTsource_adjustment_id→point_adjustments·ON DELETE RESTRICT
Được trỏ tới (1): rank_debits