from __future__ import annotations

from sqlalchemy import Boolean, String, Text
from sqlalchemy.orm import Mapped, mapped_column

from .base import Base


class TournamentRoster(Base):
    """SQLAlchemy ORM model for TournamentRosters"""

    __tablename__ = "TournamentRosters"

    # Primary Key
    UniqueLine: Mapped[str] = mapped_column(String, primary_key=True)

    # Basic Information
    OverviewPage: Mapped[str | None] = mapped_column(String, default=None)
    Tournament: Mapped[str | None] = mapped_column(String, default=None)

    # Team Information
    Team: Mapped[str | None] = mapped_column(String, default=None)
    Short: Mapped[str | None] = mapped_column(String, default=None)
    Region: Mapped[str | None] = mapped_column(String, default=None)
    PageAndTeam: Mapped[str | None] = mapped_column(String, default=None)

    # Roster Information
    RosterLinks: Mapped[str | None] = mapped_column(Text, default=None)
    Roles: Mapped[str | None] = mapped_column(Text, default=None)
    Flags: Mapped[str | None] = mapped_column(Text, default=None)
    Footnotes: Mapped[str | None] = mapped_column(
        Text, default=None
    )  # ;;-delimited list of Wikitext

    # Status
    IsUsed: Mapped[str | None] = mapped_column(Text, default=None)
    IsComplete: Mapped[bool | None] = mapped_column(Boolean, default=None)
