from dataclasses import dataclass
from datetime import datetime

from decimal import Decimal


class NoSuchCategoryError(Exception):
    pass


@dataclass(frozen=True)
class DatabaseConfiguration:
    db_user: str
    db_password: str
    db_host: str
    db_port: int
    db_name: str


@dataclass(frozen=True)
class TicketInfo:
    category: str
    total_tickets: int
    price: Decimal
    description: str
    additional_info: str
    is_default: bool


@dataclass(frozen=True)
class MailingServiceConfiguration:
    smtp_server: str
    smtp_port: int
    sender: str
    username: str
    password: str


@dataclass(frozen=True)
class LanInfo:
    name: str
    iteration: str
    date_from: datetime
    date_till: datetime
    organizer_mail: str


@dataclass(frozen=True)
class SeatingConfiguration:
    seats: dict[str, str]

@dataclass(frozen=True)
class ReceiptPrintingConfiguration:
    host: str
    port: int
    order_print_endpoint: str
    password: str
