Giao diện
payment / mock
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 đè.
4 bảng. Quay lại payment.
mock_momo_sessions
P3-03. MoMo MOCK simulator, provider side - NOT LIVE, NO REAL PAYMENT. One session per provider request id; PENDING -> SUCCEEDED | FAILED, FAILED -> SUCCEEDED only as MOCK_LATE_CAPTURE. Never read by reports.
public.mock_momo_sessions · 19 cột · 10 check · 2 unique · 3 index · 3 policy · 4 trigger · RLS bật
| Cột | Kiểu | Khoá | Mô tả | |
|---|---|---|---|---|
request_id | text | NOT NULL | PK | |
provider | text | NOT NULL | ||
provider_mode | text | NOT NULL | ||
obligation_id | uuid | NOT NULL | ||
order_id | uuid | NOT NULL | ||
amount_vnd | bigint | NOT NULL | ||
currency | text | NOT NULL | ||
payload_hash | text | NOT NULL | ||
session_ref | text | NOT NULL | ||
status | text | NOT NULL | ||
result_code | text | |||
provider_txn_id | text | |||
captured_amount_vnd | bigint | |||
expires_at | timestamptz | NOT NULL | ||
settled_at | timestamptz | |||
version | integer | NOT NULL | ||
correlation_id | text | NOT NULL | ||
created_at | timestamptz | NOT NULL | ||
updated_at | timestamptz | NOT NULL |
Khoá chính: request_id
Trỏ ra: không có
Được trỏ tới (1): mock_momo_create_plans
mock_momo_create_plans
P3-03. MoMo MOCK simulator create-time scenario armed by the QA harness - NOT LIVE. One open plan per obligation; consumed once by the create that opens the session.
public.mock_momo_create_plans · 8 cột · 3 check · 0 unique · 2 index · 3 policy · 4 trigger · RLS bật
| Cột | Kiểu | Khoá | Mô tả | |
|---|---|---|---|---|
id | uuid | NOT NULL | PK | |
obligation_id | uuid | NOT NULL | ||
scenario | text | NOT NULL | ||
armed_by | text | NOT NULL | ||
correlation_id | text | NOT NULL | ||
consumed_request_id | text | FK → mock_momo_sessions | ||
consumed_at | timestamptz | |||
created_at | timestamptz | NOT NULL |
Khoá chính: id
Trỏ ra (1):
consumed_request_id→mock_momo_sessions
Được trỏ tới: không có
mock_momo_refund_plans
P3-11. MoMo MOCK simulator refund scenario armed by the QA harness - NOT LIVE. One open plan per original provider transaction; consumed once by the refund request that meets it.
public.mock_momo_refund_plans · 8 cột · 3 check · 0 unique · 2 index · 3 policy · 3 trigger · RLS bật
| Cột | Kiểu | Khoá | Mô tả | |
|---|---|---|---|---|
id | uuid | NOT NULL | PK | |
original_txn_id | text | NOT NULL | ||
scenario | text | NOT NULL | ||
armed_by | text | NOT NULL | ||
correlation_id | text | NOT NULL | ||
consumed_request_id | text | |||
consumed_at | timestamptz | |||
created_at | timestamptz | NOT NULL |
Khoá chính: id
Trỏ ra: không có
Được trỏ tới: không có
mock_momo_refunds
P3-11. MoMo MOCK simulator, refund side - NOT LIVE, NO REAL PAYMENT. One row per refund request id, immutable; at most one ACCEPTED per original provider transaction. Never read by reports.
public.mock_momo_refunds · 12 cột · 7 check · 1 unique · 3 index · 2 policy · 3 trigger · RLS bật
| Cột | Kiểu | Khoá | Mô tả | |
|---|---|---|---|---|
request_id | text | NOT NULL | PK | |
provider | text | NOT NULL | ||
provider_mode | text | NOT NULL | ||
original_txn_id | text | NOT NULL | ||
amount_vnd | bigint | NOT NULL | ||
currency | text | NOT NULL | ||
payload_hash | text | NOT NULL | ||
status | text | NOT NULL | ||
result_code | text | |||
refund_txn_id | text | |||
correlation_id | text | NOT NULL | ||
created_at | timestamptz | NOT NULL |
Khoá chính: request_id
Trỏ ra: không có
Được trỏ tới: không có