اولین نسخه بک‌اند آرامش پلازا

This commit is contained in:
Behrad
2026-08-27 15:15:12 +03:30
commit 854309f976
26 changed files with 1861 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
DATABASE_URL: str
SECRET_KEY: str
ACCESS_TOKEN_EXPIRE_MINUTES: int = 1440
CORS_ORIGINS: str = "http://localhost:5173"
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8")
@property
def cors_origins_list(self) -> list[str]:
return [origin.strip() for origin in self.CORS_ORIGINS.split(",") if origin.strip()]
settings = Settings()