Add genlocke creation wizard with backend API and 4-step frontend
Implements the genlocke creation feature end-to-end: Genlocke and GenlockeLeg models with migration, POST /genlockes endpoint that creates the genlocke with all legs and auto-starts the first run, and a 4-step wizard UI (Name, Select Games with preset templates, Rules, Confirm) at /genlockes/new. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
30
backend/src/app/schemas/genlocke.py
Normal file
30
backend/src/app/schemas/genlocke.py
Normal file
@@ -0,0 +1,30 @@
|
||||
from datetime import datetime
|
||||
|
||||
from app.schemas.base import CamelModel
|
||||
from app.schemas.game import GameResponse
|
||||
|
||||
|
||||
class GenlockeCreate(CamelModel):
|
||||
name: str
|
||||
game_ids: list[int]
|
||||
genlocke_rules: dict = {}
|
||||
nuzlocke_rules: dict = {}
|
||||
|
||||
|
||||
class GenlockeLegResponse(CamelModel):
|
||||
id: int
|
||||
genlocke_id: int
|
||||
game_id: int
|
||||
run_id: int | None = None
|
||||
leg_order: int
|
||||
game: GameResponse
|
||||
|
||||
|
||||
class GenlockeResponse(CamelModel):
|
||||
id: int
|
||||
name: str
|
||||
status: str
|
||||
genlocke_rules: dict
|
||||
nuzlocke_rules: dict
|
||||
created_at: datetime
|
||||
legs: list[GenlockeLegResponse] = []
|
||||
Reference in New Issue
Block a user