27 lines
567 B
Python
27 lines
567 B
Python
from __future__ import annotations
|
|
|
|
from pydantic import Field
|
|
|
|
from hopper.api.dto import BaseModel, BoardDto, DestinationDto, PlayerDto, PositionDto
|
|
from hopper.enums import ObjectType
|
|
|
|
|
|
class LayerObjectDto(BaseModel):
|
|
type: ObjectType = Field(..., alias="type_")
|
|
position: PositionDto
|
|
|
|
|
|
class LayerDto(BaseModel):
|
|
name: str
|
|
objects: list[LayerObjectDto]
|
|
|
|
class GameDumpPlayerDto(PlayerDto):
|
|
...
|
|
|
|
|
|
class GameDumpDto(BaseModel):
|
|
board: BoardDto
|
|
destination: DestinationDto
|
|
players: list[GameDumpPlayerDto]
|
|
layers: list[LayerDto]
|