1.5 KiB
1.5 KiB
Domain Models
Fantasy Draft System
| Model | Description |
|---|---|
| League | Top-level container; has one or more commissioners |
| Season | One iteration of a league. Status: pre_draft → draft → active → completed |
| Team | Belongs to a season; owned by a user (ownerId = Clerk user ID) |
| Draft Slot | Defines draft order for teams in a season |
| Draft Pick | Record of each pick made |
| Draft Queue | A team's pre-ordered wish list of participants |
| Draft Timer | Active countdown for the team currently on the clock |
| Autodraft Settings | Per-team config for automatic picking |
Season status drives UI visibility: draft order shown in pre_draft, draft controls active in draft, etc.
Snake Draft Logic
- Draft slots define base order (1, 2, 3…)
- Odd rounds go 1→N; even rounds go N→1
currentPickNumberon the season tracks positionserver/timer.tshandles autopicks when timer expires
Sports Data System
| Model | Description |
|---|---|
| Sport | Base sport definition (e.g. NFL, NBA); type is team or individual |
| Sports Season | A specific season of a sport (e.g. "2024 NFL Season") |
| Participant | An athlete or team that can be drafted |
| Season Template | Reusable configuration for creating league seasons |
| Season Sport | Junction: links a fantasy season to the sports it covers |
| Participant Result | Final standings/scores for participants at season end |