refactor: complete V1 to V2 migration and remove legacy architecture
Remove all V1 architecture components and promote V2 to primary: - Delete all paddle_ocr_* table models (export, ocr, translation, user) - Delete legacy routers (auth, export, ocr, translation) - Delete legacy schemas and services - Promote user_v2.py to user.py as primary user model - Update all imports and dependencies to use V2 models only - Update main.py version to 2.0.0 Database changes: - Fix SQLAlchemy reserved word: rename audit_log.metadata to extra_data - Add migration to drop all paddle_ocr_* tables - Update alembic env to only import V2 models Frontend fixes: - Fix Select component exports in TaskHistoryPage.tsx - Update to use simplified Select API with options prop - Fix AxiosInstance TypeScript import syntax 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,59 +1,30 @@
|
||||
"""
|
||||
Tool_OCR - API Schemas
|
||||
Tool_OCR - API Schemas (V2)
|
||||
Pydantic models for request/response validation
|
||||
"""
|
||||
|
||||
from app.schemas.auth import Token, TokenData, LoginRequest
|
||||
from app.schemas.user import UserBase, UserCreate, UserResponse
|
||||
from app.schemas.ocr import (
|
||||
OCRBatchResponse,
|
||||
OCRFileResponse,
|
||||
OCRResultResponse,
|
||||
BatchStatusResponse,
|
||||
FileStatusResponse,
|
||||
ProcessRequest,
|
||||
ProcessResponse,
|
||||
)
|
||||
from app.schemas.export import (
|
||||
ExportRequest,
|
||||
ExportRuleCreate,
|
||||
ExportRuleUpdate,
|
||||
ExportRuleResponse,
|
||||
CSSTemplateResponse,
|
||||
)
|
||||
from app.schemas.translation import (
|
||||
TranslationRequest,
|
||||
TranslationResponse,
|
||||
TranslationFeatureStatus,
|
||||
LanguageInfo,
|
||||
from app.schemas.auth import LoginRequest, Token, UserResponse
|
||||
from app.schemas.task import (
|
||||
TaskCreate,
|
||||
TaskUpdate,
|
||||
TaskResponse,
|
||||
TaskDetailResponse,
|
||||
TaskListResponse,
|
||||
TaskStatsResponse,
|
||||
TaskStatusEnum,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
# Auth
|
||||
"Token",
|
||||
"TokenData",
|
||||
"LoginRequest",
|
||||
# User
|
||||
"UserBase",
|
||||
"UserCreate",
|
||||
"Token",
|
||||
"UserResponse",
|
||||
# OCR
|
||||
"OCRBatchResponse",
|
||||
"OCRFileResponse",
|
||||
"OCRResultResponse",
|
||||
"BatchStatusResponse",
|
||||
"FileStatusResponse",
|
||||
"ProcessRequest",
|
||||
"ProcessResponse",
|
||||
# Export
|
||||
"ExportRequest",
|
||||
"ExportRuleCreate",
|
||||
"ExportRuleUpdate",
|
||||
"ExportRuleResponse",
|
||||
"CSSTemplateResponse",
|
||||
# Translation (RESERVED)
|
||||
"TranslationRequest",
|
||||
"TranslationResponse",
|
||||
"TranslationFeatureStatus",
|
||||
"LanguageInfo",
|
||||
# Task
|
||||
"TaskCreate",
|
||||
"TaskUpdate",
|
||||
"TaskResponse",
|
||||
"TaskDetailResponse",
|
||||
"TaskListResponse",
|
||||
"TaskStatsResponse",
|
||||
"TaskStatusEnum",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user