15 phase 3 tournament add

This commit is contained in:
2026-03-06 17:31:13 +00:00
parent 08c5a8387f
commit 8fb576afc7
7 changed files with 191 additions and 0 deletions

View File

@@ -18,12 +18,14 @@ class User(Base):
id: Mapped[int] = mapped_column(primary_key=True)
email: Mapped[str] = mapped_column(String, unique=True, index=True)
hashed_password: Mapped[str] = mapped_column(String)
is_superuser: Mapped[bool] = mapped_column(Boolean, default=False)
tickets: Mapped[list["Ticket"]] = relationship(back_populates="user")
class Tournament(Base):
__tablename__ = "tournaments"
id: Mapped[int] = mapped_column(primary_key=True)
title: Mapped[str] = mapped_column(String)
description: Mapped[str | None] = mapped_column(String, nullable=True)
event_date: Mapped[datetime] = mapped_column(DateTime(timezone=True))
is_active: Mapped[bool] = mapped_column(Boolean, default=True)
seats: Mapped[list["Seat"]] = relationship(back_populates="tournament")