Team tasksAnis
SRV-49 — Gift chest and wheel of fortune
Prize tables, entitlements and server-side draws with stock and budget limits.
| Field | Details |
|---|---|
| Task code | SRV-49 |
| Phase | P4 — V2 evolutions |
| Product scope | V2 |
| Status | Planned |
| Start | Mon 15 Mar 2027 |
| Due | Tue 16 Mar 2027 |
| Responsible | Anis — Full-stack developer |
| Co-responsible | — |
| Effort | 2 person-day(s) planned · 5 from scratch · size M |
| Area · app | Server · server |
| Depends on | SRV-48 |
| Unblocks | SRV-50 |
| Milestones | — |
Summary
Prize tables, entitlements and server-side draws with stock and budget limits.
Description
Change request 04 (client loyalty document and letter of 6 Nov 2026), not yet accepted or priced by HOCO. Builds PrizeTable, PrizeTableEntry and PrizeEntitlement, the entitlements created by qualified events, the server draw with stock and budget, and the expiry of chests and spins. Stays off until the legal check D-61 is closed and the budget D-55 is set.
Subtasks
| # | Subtask | Owner |
|---|---|---|
| 1 | Prize tables with odds, stock and budget, admin.loyalty.prizeTables.crud | Anis |
| 2 | Entitlements from qualified events | Anis |
| 3 | Draw in a transaction with a secure random source | Anis |
| 4 | Applying each prize type | Anis |
| 5 | Reversal when the source order is cancelled | Anis |
Deliverables
- apps/server/src/modules/loyalty/prizes.service.ts
Acceptance criteria
- One entitlement gives one draw, even from two devices (LOY-18, LOY-19)
- A prize without stock or budget is never drawn (LOY-18)
- No stock or budget number reaches a reseller (BR-99)
Requirements covered
| Requirement | Title | Release |
|---|---|---|
| LOY-18 | Gift chest with configured prizes, odds and budget | V2 |
| LOY-19 | Wheel of fortune, optional, one spin per entitlement | V2 |
API surface
| Endpoint group | Operations |
|---|---|
| Loyalty (V2) | 23 |
| Promotions & loyalty | 41 |
Test measures
- Statistical test of the odds
- Concurrency test of opening
Risks
- Legal check open (D-61): the task may be dropped or changed to fixed prizes
KPI
- Delivered by Tue 16 Mar 2027 within 2 person-day(s).
- Every acceptance criterion above demonstrated before hand-off; linked requirements' acceptance criteria pass.
- Zero open critical defects, permission gaps or data-integrity regressions at sign-off.
Generated from content/plan/tasks.json by scripts/generate-team-tasks.mjs. Dates are computed by the scheduler (Sunday–Thursday weeks, holidays excluded) — change the plan, not this page.