Define Game, Route, Pokemon, RouteEncounter, Encounter, and NuzlockeRun types mirroring the backend schema, with EncounterStatus and RunStatus discriminated union types. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1.1 KiB
1.1 KiB
title, status, type, priority, created_at, updated_at, parent, blocking
| title | status | type | priority | created_at | updated_at | parent | blocking | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Game Data Models & Types | completed | task | normal | 2026-02-04T15:44:08Z | 2026-02-05T12:33:38Z | nuzlocke-tracker-f5ob |
|
Define the core data structures and TypeScript types for the application.
Checklist
- Define Game type (id, name, slug, generation, region, boxArtUrl, releaseYear)
- Define Route/Area type (id, name, gameId, order)
- Define Pokemon type (id, nationalDex, name, types, spriteUrl)
- Define Encounter type (id, runId, routeId, pokemonId, nickname, status, catchLevel, faintLevel, caughtAt)
- Define NuzlockeRun type (id, gameId, name, status, rules, startedAt, completedAt)
- Define RuleSettings type (already existed in rules.ts)
- Define RouteEncounter type (id, routeId, pokemonId, encounterMethod, encounterRate)
- Define EncounterStatus and RunStatus discriminated union types
Notes
- Keep types flexible for future expansion
- Consider using discriminated unions for status types