2024-08-02 11:32:56 +02:00
|
|
|
from pydantic import BaseModel
|
2024-08-02 11:43:30 +02:00
|
|
|
from datetime import date
|
|
|
|
|
|
|
|
|
|
class PlayPlayer(BaseModel):
|
|
|
|
|
name: str
|
|
|
|
|
username: str
|
|
|
|
|
score: float
|
2024-08-02 11:51:25 +02:00
|
|
|
first_play : bool
|
|
|
|
|
has_won : bool
|
2024-08-02 11:32:56 +02:00
|
|
|
|
|
|
|
|
class Play(BaseModel):
|
2024-08-02 11:43:30 +02:00
|
|
|
boardgame_id: int
|
|
|
|
|
players: list[PlayPlayer]
|
|
|
|
|
playdate: date
|
|
|
|
|
duration: int #In minutes
|
|
|
|
|
ignore_for_stats : bool
|
|
|
|
|
location: str
|