Add REST API endpoints for games, runs, and encounters
Implement 13 endpoints: read-only reference data (games, routes, pokemon), run CRUD with cascading deletes, and encounter management. Uses Pydantic v2 with camelCase alias generation to match frontend types, and nested response schemas for detail views. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
10
backend/src/app/schemas/base.py
Normal file
10
backend/src/app/schemas/base.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
from pydantic.alias_generators import to_camel
|
||||
|
||||
|
||||
class CamelModel(BaseModel):
|
||||
model_config = ConfigDict(
|
||||
from_attributes=True,
|
||||
alias_generator=to_camel,
|
||||
populate_by_name=True,
|
||||
)
|
||||
Reference in New Issue
Block a user