Giao diện
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 API | pipoint |
| Query / Mutation | 15 / 9 |
| Nguồn dữ liệu | pipoint |
| Bảng | 13 |
| Luật phân quyền | 2 |
| Đường dẫn Web Admin | 10 |
Thao tác (mutation)
| Mutation | Domain | Mô tả |
|---|---|---|
approvePointAdjust | pipoint | A different person (finance) approves: exactly one ADJUST is queued for PiPoint (F-07, MFA). |
approveRankDebit | pipoint | A different person (finance) approves: one signed rank entry, the customer is evaluated at once (F-07, MFA). |
decideEkycRequest | pipoint | Approve or reject a REVIEW request sent from PIDEAL (EKY-02 ekyc.review: admin, super_admin, MFA step-up |
linkPointAccount | pipoint | Requires wallet.link (own account, APP_USER/APP_SALE) AND a verified eKYC |
rejectPointAdjust | pipoint | A different person (finance) rejects: nothing is ever sent (F-07, MFA). |
rejectRankDebit | pipoint | A different person (finance) rejects: the rank never moves (F-07, MFA). |
requestPointAdjust | pipoint | Operations maker proposes an ADJUST (F-06, MFA). Nothing is sent. |
requestRankDebit | pipoint | Operations maker proposes the rank-only debit of a slip PiPoint refused for insufficient points (F-06, MFA). The rank does not move yet. |
settlePointReport | pipoint | Finance marks an ended month's DRAFT as settled, offline (PRP-02, MFA). Marker only. |
Phép đọc (query)
| Query | Domain | Mô tả |
|---|---|---|
customerIdentity | pipoint | eKYC state, identity and images of a customer (EKY-01). |
customerPointHistory | pipoint | Requires point_adjust.read (ADJ-01, WEB_ADMIN operations / finance). One |
ekycRequest | pipoint | One request with identity, checklist and images (EKY-01; never your own: forbidden self_review). |
ekycRequests | pipoint | PIDEAL's eKYC requests at PiPoint (EKY-01 ekyc.read). REVIEW only: oldest first; otherwise newest first. |
myPointWallet | pipoint | Requires wallet.read (own wallet, APP_USER/APP_SALE). |
pointAdjustment | pipoint | |
pointAdjustments | pipoint | Proposals, newest first (ADJ-01). |
pointHistory | pipoint | Requires wallet.read. page is capped at 100 (provider calls per read). |
pointReconciliation | pipoint | PRC-01 reconcile.read (Finance): every PiPoint daily run version of one VN date, newest first. |
pointReport | pipoint | |
pointReports | pipoint | Report versions newest first (PRP-01). month is a VN month YYYY-MM. |
pointRequest | pipoint | PPI-P8-01 (ADJ-01): one point command with its original, follow-ups and reconciliation items. |
pointRequests | pipoint | PPI-P8-01 (ADJ-01 point_adjust.read): point commands PIDEAL sent to PiPoint, newest first, pageSize <= 100. |
rankAdjustment | pipoint | |
rankAdjustments | pipoint | Rank-only debits, newest first (ADJ-01). |
Dữ liệu
- Domain
pipoint— 13 bảng, 3 nhóm con: point (10) · pipoint (2) · rank_adjustments (1)
Bảng được tham chiếu nhiều nhất trong module:
| Bảng | Cột | Được trỏ tới | RLS |
|---|---|---|---|
point_requests | 40 | 12 | ✓ |
point_account_links | 11 | 3 | ✓ |
point_report_versions | 35 | 2 | ✓ |
point_adjustments | 30 | 1 | ✓ |
point_reconciliation_items | 27 | 1 | ✓ |
point_reconciliation_runs | 22 | 1 | ✓ |
rank_adjustments | 18 | 1 | ✓ |
pipoint_ekyc_snapshots | 13 | 0 | ✓ |
pipoint_event_receipts | 9 | 0 | ✓ |
point_report_version_lines | 10 | 0 | ✓ |
Quyền
| Mã | Quyền | Ứng dụng | Vai trò | Phạm vi | Trạng thái |
|---|---|---|---|---|---|
EKY-01 | ekyc.read | WEB_ADMIN | operations admin super_admin | ALL | PROPOSED |
EKY-02 | ekyc.review | WEB_ADMIN | admin super_admin | ALL | PROPOSED |
Danh sách đầy đủ và cách đọc các cờ: Ma trận quyền.
Giao diện Web Admin
| Đường dẫn | Hằng số |
|---|---|
/points/adjustments | POINT_ADJUSTMENTS |
/points/adjustments/:id | POINT_ADJUSTMENT_DETAIL |
/points/adjustments/new | POINT_ADJUSTMENT_NEW |
/points/config | POINT_CONFIG |
/points/ledger | POINT_LEDGER |
/points/reconciliation | POINT_RECONCILIATION |
/points/reconciliation/:id | POINT_RECONCILIATION_ITEM |
/points/reports | POINT_REPORTS |
/points/reports/:id | POINT_REPORT_DETAIL |
/points/transactions | POINT_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.