Skip to content

order_fulfillment / fulfillment ​

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 order_fulfillment.

fulfillment_events ​

P2-17. Append-only shipment history: CREATED / TRANSITION / ISSUE facts from OPERATOR, CARRIER or SYSTEM (never a customer); unique (source, source_event_id); unapplied carrier facts kept as STALE/OUT_OF_ORDER.

public.fulfillment_events · 20 cột · 12 check · 2 unique · 6 index · 1 policy · 4 trigger · RLS bật

CộtKiểuKhoáMô tả
iduuidNOT NULLPK
shipment_iduuidNOT NULLFK → shipments
kindtextNOT NULL
outcometextNOT NULL
shipment_versioninteger
from_statetext
to_statetext
issue_codetext
sourcetextNOT NULL
source_event_idtextNOT NULL
actor_account_iduuidFK → accounts
carrier_codetext
payload_hashtext
occurred_attimestamptzNOT NULL
recorded_attimestamptzNOT NULL
reasontext
evidence_media_iduuidFK → media
reapplies_event_iduuidFK → fulfillment_events
actor_labeltext
actor_rolestext[]

Khoá chính: id

Trỏ ra (4):

  • actor_account_id → accounts · ON DELETE RESTRICT
  • evidence_media_id → media · ON DELETE RESTRICT
  • reapplies_event_id → fulfillment_events · ON DELETE RESTRICT
  • shipment_id → shipments · ON DELETE RESTRICT

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

fulfillment_exceptions ​

P2-21. Append-only incident records (DELIVERY_FAILED / CARRIER_OUTAGE / LOST) from OPERATOR, CARRIER or SYSTEM; never move a shipment; cod_signal tells COD nothing is decided for refusal/loss (OI-FF-01).

public.fulfillment_exceptions · 17 cột · 13 check · 1 unique · 4 index · 1 policy · 3 trigger · RLS bật

CộtKiểuKhoáMô tả
iduuidNOT NULLPK
shipment_iduuidNOT NULLFK → shipments
link_iduuidFK → shipment_order_links
kindtextNOT NULL
issue_codetext
sourcetextNOT NULL
source_event_idtextNOT NULL
actor_account_iduuidFK → accounts
carrier_codetext
payload_hashtext
occurred_attimestamptzNOT NULL
recorded_attimestamptzNOT NULL
observed_versionintegerNOT NULL
observed_statetextNOT NULL
cod_signaltextNOT NULL
reasontext
evidence_media_iduuidFK → media

Khoá chính: id

Trỏ ra (4):

  • actor_account_id → accounts · ON DELETE RESTRICT
  • evidence_media_id → media · ON DELETE RESTRICT
  • link_id → shipment_order_links · ON DELETE RESTRICT
  • shipment_id → shipments · ON DELETE RESTRICT

Được trỏ tới: không có

Sinh từ ad83b0aea · 820 migration · PostgreSQL 17