2026-02-05 15:09:05 +01:00
|
|
|
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
|
2026-02-07 21:08:25 +01:00
|
|
|
is_shiny: bool = False
|
2026-02-05 15:09:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class EncounterUpdate(CamelModel):
|
|
|
|
|
nickname: str | None = None
|
|
|
|
|
status: str | None = None
|
|
|
|
|
faint_level: int | None = None
|
2026-02-05 18:36:08 +01:00
|
|
|
death_cause: str | None = None
|
2026-02-05 19:26:49 +01:00
|
|
|
current_pokemon_id: int | None = None
|
2026-02-05 15:09:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class EncounterResponse(CamelModel):
|
|
|
|
|
id: int
|
|
|
|
|
run_id: int
|
|
|
|
|
route_id: int
|
|
|
|
|
pokemon_id: int
|
2026-02-05 19:26:49 +01:00
|
|
|
current_pokemon_id: int | None
|
2026-02-05 15:09:05 +01:00
|
|
|
nickname: str | None
|
|
|
|
|
status: str
|
|
|
|
|
catch_level: int | None
|
|
|
|
|
faint_level: int | None
|
2026-02-05 18:36:08 +01:00
|
|
|
death_cause: str | None
|
2026-02-07 21:08:25 +01:00
|
|
|
is_shiny: bool
|
2026-02-05 15:09:05 +01:00
|
|
|
caught_at: datetime
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class EncounterDetailResponse(EncounterResponse):
|
|
|
|
|
pokemon: PokemonResponse
|
2026-02-05 19:26:49 +01:00
|
|
|
current_pokemon: PokemonResponse | None
|
2026-02-05 15:09:05 +01:00
|
|
|
route: RouteResponse
|
2026-02-08 13:14:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class BulkRandomizeResponse(CamelModel):
|
|
|
|
|
created: list[EncounterResponse]
|
|
|
|
|
skipped_routes: int
|