from pydantic_settings import BaseSettings
from typing import Optional


class Settings(BaseSettings):
    redis_url: str = "redis://localhost:6379/0"
    database_url: str = "mysql+pymysql://fang360:fang360@localhost:3306/fang360"
    api_url: str = "http://localhost:8000"
    upload_dir: str = "./uploads"
    confidence_threshold: float = 0.7
    yaw_tolerance: float = 20.0

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


settings = Settings()
