Files
nuzlocke-tracker/backend/src/app/schemas/encounter.py
Julian Tabel 9728773a94 Add pokemon evolution support across the full stack
- Evolution model with trigger, level, item, and condition fields
- Encounter.current_pokemon_id tracks evolved species separately
- Alembic migration for evolutions table and current_pokemon_id column
- Seed pipeline loads evolution data with manual overrides
- GET /pokemon/{id}/evolutions and PATCH /encounters/{id} endpoints
- Evolve button in StatusChangeModal with evolution method details
- PokemonCard shows evolved species with "Originally" label

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-05 19:26:49 +01:00

42 lines
970 B
Python

from datetime import datetime
from app.schemas.base import CamelModel
from app.schemas.game import RouteResponse
from app.schemas.pokemon import PokemonResponse
class EncounterCreate(CamelModel):
route_id: int
pokemon_id: int
nickname: str | None = None
status: str
catch_level: int | None = None
class EncounterUpdate(CamelModel):
nickname: str | None = None
status: str | None = None
faint_level: int | None = None
death_cause: str | None = None
current_pokemon_id: int | None = None
class EncounterResponse(CamelModel):
id: int
run_id: int
route_id: int
pokemon_id: int
current_pokemon_id: int | None
nickname: str | None
status: str
catch_level: int | None
faint_level: int | None
death_cause: str | None
caught_at: datetime
class EncounterDetailResponse(EncounterResponse):
pokemon: PokemonResponse
current_pokemon: PokemonResponse | None
route: RouteResponse