# app/config.py from pydantic_settings import BaseSettings from functools import lru_cache class Settings(BaseSettings): # App APP_NAME: str = "飞点健康 CMS" DEBUG: bool = True # Database DATABASE_URL: str = "sqlite:///./cms.db" # JWT SECRET_KEY: str = "your-secret-key-change-in-production" ALGORITHM: str = "HS256" ACCESS_TOKEN_EXPIRE_MINUTES: int = 60 * 24 # 24 hours # CORS CORS_ORIGINS: list = ["http://localhost:5173","http://49.235.37.80:18888", "http://localhost:10002", "http://129.211.173.87:10002", "http://49.235.37.80:8888"] # Upload UPLOAD_DIR: str = "../storage/admin/images" MAX_UPLOAD_SIZE: int = 5 * 1024 * 1024 # 5MB class Config: env_file = ".env" @lru_cache() def get_settings(): return Settings()