Skip to content

PiPoint & Điểm ​

Trang sinh tự động

Phần nghiệp vụ viết tay; API, dữ liệu, quyền, đường dẫn và file nguồn do bộ sinh điền từ source tại ad83b0aea.

Làm gì ​

PiPoint là hệ thống định danh và ví điểm dùng chung của tập đoàn, nằm ngoài PIDEAL. PIDEAL không giữ số dư điểm của riêng mình: chỉ điểm đang chờ là của PIDEAL, còn ghi có thật thì qua ví PiPoint. Gồm cả eKYC, phiếu điều chỉnh điểm và đối soát.

Quy mô ​

Domain APIpipoint
Query / Mutation15 / 9
Nguồn dữ liệupipoint
Bảng13
Luật phân quyền2
Đường dẫn Web Admin10

Thao tác (mutation) ​

MutationDomainMô tả
approvePointAdjustpipointA different person (finance) approves: exactly one ADJUST is queued for PiPoint (F-07, MFA).
approveRankDebitpipointA different person (finance) approves: one signed rank entry, the customer is evaluated at once (F-07, MFA).
decideEkycRequestpipointApprove or reject a REVIEW request sent from PIDEAL (EKY-02 ekyc.review: admin, super_admin, MFA step-up
linkPointAccountpipointRequires wallet.link (own account, APP_USER/APP_SALE) AND a verified eKYC
rejectPointAdjustpipointA different person (finance) rejects: nothing is ever sent (F-07, MFA).
rejectRankDebitpipointA different person (finance) rejects: the rank never moves (F-07, MFA).
requestPointAdjustpipointOperations maker proposes an ADJUST (F-06, MFA). Nothing is sent.
requestRankDebitpipointOperations maker proposes the rank-only debit of a slip PiPoint refused for insufficient points (F-06, MFA). The rank does not move yet.
settlePointReportpipointFinance marks an ended month's DRAFT as settled, offline (PRP-02, MFA). Marker only.

Phép đọc (query) ​

QueryDomainMô tả
customerIdentitypipointeKYC state, identity and images of a customer (EKY-01).
customerPointHistorypipointRequires point_adjust.read (ADJ-01, WEB_ADMIN operations / finance). One
ekycRequestpipointOne request with identity, checklist and images (EKY-01; never your own: forbidden self_review).
ekycRequestspipointPIDEAL's eKYC requests at PiPoint (EKY-01 ekyc.read). REVIEW only: oldest first; otherwise newest first.
myPointWalletpipointRequires wallet.read (own wallet, APP_USER/APP_SALE).
pointAdjustmentpipoint
pointAdjustmentspipointProposals, newest first (ADJ-01).
pointHistorypipointRequires wallet.read. page is capped at 100 (provider calls per read).
pointReconciliationpipointPRC-01 reconcile.read (Finance): every PiPoint daily run version of one VN date, newest first.
pointReportpipoint
pointReportspipointReport versions newest first (PRP-01). month is a VN month YYYY-MM.
pointRequestpipointPPI-P8-01 (ADJ-01): one point command with its original, follow-ups and reconciliation items.
pointRequestspipointPPI-P8-01 (ADJ-01 point_adjust.read): point commands PIDEAL sent to PiPoint, newest first, pageSize <= 100.
rankAdjustmentpipoint
rankAdjustmentspipointRank-only debits, newest first (ADJ-01).

Dữ liệu ​

Bảng được tham chiếu nhiều nhất trong module:

BảngCộtĐược trỏ tớiRLS
point_requests4012✓
point_account_links113✓
point_report_versions352✓
point_adjustments301✓
point_reconciliation_items271✓
point_reconciliation_runs221✓
rank_adjustments181✓
pipoint_ekyc_snapshots130✓
pipoint_event_receipts90✓
point_report_version_lines100✓

Quyền ​

MãQuyềnỨng dụngVai tròPhạm viTrạng thái
EKY-01ekyc.readWEB_ADMINoperations admin super_adminALLPROPOSED
EKY-02ekyc.reviewWEB_ADMINadmin super_adminALLPROPOSED

Danh sách đầy đủ và cách đọc các cờ: Ma trận quyền.

Giao diện Web Admin ​

Đường dẫnHằng số
/points/adjustmentsPOINT_ADJUSTMENTS
/points/adjustments/:idPOINT_ADJUSTMENT_DETAIL
/points/adjustments/newPOINT_ADJUSTMENT_NEW
/points/configPOINT_CONFIG
/points/ledgerPOINT_LEDGER
/points/reconciliationPOINT_RECONCILIATION
/points/reconciliation/:idPOINT_RECONCILIATION_ITEM
/points/reportsPOINT_REPORTS
/points/reports/:idPOINT_REPORT_DETAIL
/points/transactionsPOINT_TRANSACTIONS

File nguồn ​

Backend:

  • code/apps/api/supabase/functions/graphql/domains/pipoint/

Dữ liệu: bảng thuộc domain pipoint — xem Cơ sở dữ liệu.

Tài nguyên quyền không có luật nào

Bản đồ module khai các tài nguyên point, pipoint nhưng ma trận quyền không có luật nào cho chúng. Hoặc tên tài nguyên trong bản đồ sai, hoặc quyền chưa được định nghĩa.

Sinh từ ad83b0aea · 820 migration · PostgreSQL 17