feat(mock): initialize project structure and configuration

This commit is contained in:
wkc
2026-03-03 08:59:26 +08:00
parent 20a0ebfbef
commit aa17a14c4e
7 changed files with 248 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
from pydantic_settings import BaseSettings
from typing import Optional
class Settings(BaseSettings):
"""全局配置类"""
# 应用配置
APP_NAME: str = "流水分析Mock服务"
APP_VERSION: str = "1.0.0"
DEBUG: bool = True
# 服务器配置
HOST: str = "0.0.0.0"
PORT: int = 8000
# 模拟配置
PARSE_DELAY_SECONDS: int = 4 # 文件解析延迟秒数
MAX_FILE_SIZE: int = 10485760 # 10MB
# 测试数据配置
INITIAL_PROJECT_ID: int = 1000
INITIAL_LOG_ID: int = 10000
class Config:
env_file = ".env"
env_file_encoding = "utf-8"
settings = Settings()