聚合 GET /admin/users/:id/entitlements(Membership∪DeepAccess∪问答额度)与 admin-h5 权益 Tab;无 migration / 无真支付。 Co-authored-by: Cursor <cursoragent@cursor.com>
37 lines
1.1 KiB
Markdown
37 lines
1.1 KiB
Markdown
# Feature Spec: Entitlement(Ops · ECR-018)
|
||
|
||
> Status: `Active`(Loop continuous · **ECR-018 Closed**)
|
||
> Parent: WAVE0-FROZEN · Predecessor: ECR-017 Closed
|
||
> Capability: `CommerceEntitlement` · BC: `Membership_Orders`
|
||
> 授权:`docs/WAVE0/LOOP_AUTHORIZATION.md`
|
||
|
||
## Non-goals
|
||
|
||
真支付 · 改订单/退款 · 新建权益矩阵表 · UGC · 改报告正文 · ask_pack SKU
|
||
|
||
## L2 读模型(无 migration)
|
||
|
||
| 概念 | 来源 |
|
||
|------|------|
|
||
| `Entitlement` | Membership + DeepAccess 列表 + ask_paid_quota 聚合 |
|
||
| flags | `report_detail_via_membership` · `deep_access_count` |
|
||
|
||
## L3 API
|
||
|
||
| Method | Path | 权限 | 语义 |
|
||
|--------|------|------|------|
|
||
| GET | `/admin/users/:id/entitlements` | `admin.users.read` | 用户权益只读视图 |
|
||
|
||
## L4 AC
|
||
|
||
| ID | Then |
|
||
|----|------|
|
||
| AC-F-01 | 授予会员后 flags.report_detail_via_membership=true |
|
||
| AC-F-02 | 有 deep_access 时 deep_accesses 非空或 count≥1 |
|
||
| AC-F-03 | 无会员无深度 → membership.active=false 且 count=0 仍 200 |
|
||
| AC-S-01 | 无 Admin → 401 |
|
||
| AC-P-01 | GET < 500ms 本机 |
|
||
| AC-O-01 | N/A 只读 |
|
||
|
||
contract_diff: `docs/CONTRACT_DIFF/ECR-018.yaml`
|