from pydantic_settings import BaseSettings


class Settings(BaseSettings):
    DATABASE_URL: str
    LOG_LEVEL: str = 'info'
    LOG_FILE: str = 'logs/app.log'
    SECRET_KEY: str
    ALGORITHM: str
    APP_PREFIX: str = '/api/v1'
    FILE_UPLOAD_DIR: str = 'uploads'
    BACKUP_DIR: str = 'backups'
    BACKUP_DB_URL: str
    PG_DUMP_PATH: str

    class Config:
        env_file = '.env'
        env_file_encoding = 'utf-8'


settings = Settings()


def get_auth_data():
    return {'secret_key': settings.SECRET_KEY, 'algorithm': settings.ALGORITHM}
