from pydantic_settings import BaseSettings
from pathlib import Path


_project_root = Path(__file__).resolve().parent.parent.parent


class Settings(BaseSettings):
    database_url: str = f"sqlite:///{_project_root / 'data' / 'flight_delays.db'}"
    bts_download_dir: Path = _project_root / "data" / "raw"
    bts_start_year: int = 2023
    bts_end_year: int = 2024
    frontend_dir: Path = _project_root / "frontend"

    class Config:
        env_file = ".env"
        case_sensitive = False


settings = Settings()
