- 更新配置模块 (config.py) - 更新数据库连接 (database.py) - 更新主应用入口 (main.py) - 更新数据模型 (models.py) - 更新基础 Schema (base.py) - 更新文件处理器 (docx, excel, pdf) - 更新 Dockerfile Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
21 lines
436 B
Python
21 lines
436 B
Python
"""
|
|
Base Pydantic schemas
|
|
"""
|
|
from datetime import datetime
|
|
from typing import Optional, Any
|
|
from uuid import UUID
|
|
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
|
|
class TimestampMixin(BaseModel):
|
|
"""Mixin for timestamps"""
|
|
created_at: Optional[datetime] = None
|
|
updated_at: Optional[datetime] = None
|
|
|
|
|
|
class UUIDMixin(BaseModel):
|
|
"""Mixin for UUID"""
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|
|
id: UUID
|