# backend/app/core/structures.py
from dataclasses import dataclass, field
from typing import Optional

from ..constants import BracketTypes


@dataclass
class Match:
    id: int
    bracket_type: BracketTypes
    round_number: int
    next_win: Optional["Match"] = None
    next_loss: Optional["Match"] = None
    next_win_slot: int = 0
    next_loss_slot: int = 0
    teams: list[Optional[int]] = field(default_factory=lambda: [None, None])
    is_bye: bool = False
    ghost_count: int = 0
