Velox System
Purpose: Velox is the backend system used for managing the configuration of Mystery Box, including CRUD operations
Functional Requirements
Mystery Box Management:
- Create Mystery Box:
- Define properties:
name, startDay, endDay, boxCount, pvsCurrency, revealMissedPrizes, celestaSegmentId.
- Associate prizes with boxes:
- Properties include
prizeId, type, amount, quantity, probability.
- Validate configurations:
- Prevent overlapping Mystery Box periods for the same
pvsCurrency.
- Retrieve Mystery Box:
- Retrieve single or multiple box configurations by:
mysteryBoxId (specific box).
- Global list for reporting or administrative purposes.
- Update Mystery Box:
- Modify existing boxes:
- Update properties like dates, currency, and prizes.
- Ensure updates do not conflict with existing configurations or prizes.
- Delete Mystery Box:
- Remove a box and its associated data:
- All linked player claims and prize definitions.
- Disallow deletion for completed boxes.
Validation:
- Prevent overlapping date ranges within the same
pvsCurrency.
- Validate that all prizes comply with configuration standards:
- Proper format, valid IDs, non-negative quantities, and probabilities.
Brand System
Purpose: The Brand system delivers Mystery Box data and manages player interactions, including viewing available rewards and claiming them.
- Status Check:
- Provide the current status of the Mystery Box for a player:
- Possible statuses:
active, claimed, opened, disabled.
- Calculate time remaining until the end of the day using timezone offsets.
- Prize Retrieval:
- Return prize details if the player has an active or opened box.
- For expired or disabled boxes, return relevant status messages.
- Prevent duplicate claims or re-openings for the same prize.
- Prize Claiming:
- Validate claims to ensure the prize is available and not already claimed or expired.
- Assign the prize to the player and update its status.
- Dynamic Prize Selection:
- Prizes are selected based on:
- Player tier.
- Probability weights assigned to each prize.
- Player currency.
- Timezone Handling:
- All time calculations use timezone-aware timestamps.
timezoneOffset adjusts the player's local time for operations like determining active boxes.
- Box Status Lifecycle:
- Planned: Before the start date.
- In Progress: Active between
startDay and endDay.
- Completed: After the end date.