bgg_api/src/classes/play_classes.py

18 lines
386 B
Python
Raw Normal View History

2024-08-02 11:32:56 +02:00
from pydantic import BaseModel
from typing import Union
2024-08-02 11:43:30 +02:00
from datetime import date
class PlayPlayer(BaseModel):
name: str
username: str
score: Union[float, None]
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]
play_date: date
2024-08-02 11:43:30 +02:00
duration: int #In minutes
ignore_for_stats : bool
location: str