14 lines
375 B
Python
14 lines
375 B
Python
|
|
from sqlmodel import SQLModel, Field, Relationship
|
||
|
|
from src.classes.play_classes import PlayPlayer
|
||
|
|
|
||
|
|
class Player(SQLModel, table=True):
|
||
|
|
name: str | None = Field(default=None, primary_key=True)
|
||
|
|
|
||
|
|
playplayers: list[PlayPlayer] = Relationship(back_populates="player")
|
||
|
|
|
||
|
|
|
||
|
|
class PlayerPublic(SQLModel):
|
||
|
|
name: str
|
||
|
|
|
||
|
|
class PlayerPublicNoPlayPlayers(SQLModel):
|
||
|
|
name: str
|