- 完成 T-001A: 前端项目初始化 (Next.js 14 + TypeScript + Tailwind CSS) - 完成 T-001B: 后端项目初始化 (FastAPI + SQLAlchemy + asyncpg) - 完成 T-002: 数据库配置 (KolVideo 模型 + 索引 + 测试) - 完成 T-003: 基础 UI 框架 (Header/Footer 组件 + 品牌色系) - 完成 T-004: 环境变量配置 (前后端环境变量) Co-Authored-By: Claude <noreply@anthropic.com>
29 lines
659 B
Python
29 lines
659 B
Python
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
from typing import List
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
"""Application settings."""
|
|
|
|
model_config = SettingsConfigDict(
|
|
env_file=".env",
|
|
env_file_encoding="utf-8",
|
|
)
|
|
|
|
# Database
|
|
DATABASE_URL: str = "postgresql+asyncpg://user:password@localhost:5432/yuntu_kol"
|
|
|
|
# CORS
|
|
CORS_ORIGINS: List[str] = ["http://localhost:3000"]
|
|
|
|
# Brand API
|
|
BRAND_API_BASE_URL: str = "https://api.internal.intelligrow.cn"
|
|
|
|
# API Settings
|
|
MAX_QUERY_LIMIT: int = 1000
|
|
BRAND_API_TIMEOUT: float = 3.0
|
|
BRAND_API_CONCURRENCY: int = 10
|
|
|
|
|
|
settings = Settings()
|