15 phase 3 tournament add
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user