feat(ECR-015): RedemptionCode 兑换码并 Closed

批次生成/作废、C 端兑码延长会员;admin-h5 /codes。
Loop continuous。Next:ECR-016 UserIntelligence。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jackyu66git
2026-08-07 18:16:13 +08:00
co-authored by Cursor
parent 0e26aabef8
commit 1eeb0b00e7
33 changed files with 1073 additions and 36 deletions
+28
View File
@@ -0,0 +1,28 @@
ecr: ECR-015
capability: CommerceEntitlement
bounded_context: Membership_Orders
parent: WAVE0-FROZEN
predecessor: ECR-014
change:
type: additive
breaking_change: false
migration_required: true
compatibility_notes: >
New redemption_batches / redemption_codes.
C-end POST /membership/redeem extends membership without payment.
Additive RBAC admin.membership.codes.read/write.
entities:
- name: RedemptionBatch
before: null
after: { fields: [id, label, plan_code, quantity, created_by, created_at] }
- name: RedemptionCode
before: null
after: { fields: [id, batch_id, code, plan_code, status, redeemed_by, redeemed_at] }
apis:
- { method: POST, path: /api/v1/admin/redemption-batches, change: added }
- { method: GET, path: /api/v1/admin/redemption-batches, change: added }
- { method: GET, path: /api/v1/admin/redemption-batches/{id}/codes, change: added }
- { method: POST, path: /api/v1/admin/redemption-codes/{id}/disable, change: added }
- { method: POST, path: /api/v1/membership/redeem, change: added }