from pydantic_settings import BaseSettings
from functools import lru_cache


class Settings(BaseSettings):
    database_url: str = "postgresql://postgres:123456@localhost:5432/nursery_ops"
    api_prefix: str = "/api"
    debug: bool = True
    auto_post_sales: bool = True
    branch_enforce: bool = False

    class Config:
        env_file = ".env"


@lru_cache
def get_settings() -> Settings:
    return Settings()
