E12-F1: Petrol Sales Section (Mobile App)¶
Epic: E12: Physical Sales (Petrol)
Size: M (Medium)
Problem / Outcome¶
Hidden Petrol sales flow accessible via QR deeplink.
Scope¶
In-Scope:
- Deeplink handling for Petrol section
- Availability check on entry
- Quantity selection
- Ticket holder entry
- PIN generation (5-digit numeric)
Out-of-Scope:
- Direct purchase (all purchases via PIN at station)
Acceptance Criteria¶
- AC1: Section only accessible via QR deeplink (hidden from navigation)
- AC2: Availability checked on entry, sold out message if no tickets
- AC3: PIN generated (5-digit numeric) after ticket holder entry
Data Model Impact¶
PetrolPIN table:
- id (UUID, PK)
- pin (VARCHAR(5), UNIQUE)
- user_id (UUID, FK)
- match_id (UUID, FK)
- quantity (INTEGER)
- ticket_holders_json (JSONB)
- status (ENUM: active, used, expired, cancelled)
- expires_at (TIMESTAMP) - 24 hours from creation
- created_at (TIMESTAMP)
- used_at (TIMESTAMP, nullable)
PetrolDeeplink table:
- id (UUID, PK)
- match_id (UUID, FK)
- deeplink_url (VARCHAR)
- qr_code_data (VARCHAR)
- is_active (BOOLEAN)
- created_at (TIMESTAMP)
Permissions/Roles¶
- Authenticated user
How to Verify¶
npm test -- --grep "petrol mobile"
Expected: Deeplink works, PIN generated.
Dependencies¶
Implementation Tasks¶
See E12: Physical Sales (Petrol) Tasks
Doc References¶
Last Updated: January 2026