d6508e0ae8
Implementazione completa del backend FastAPI: - Modelli SQLAlchemy: User, Recipe, RecipeVersion, RecipeTask, RecipeSubtask, Measurement, AccessLog, SystemSetting, RecipeVersionAudit - Schemas Pydantic v2 per tutti i CRUD + statistiche SPC - Middleware: API Key auth (X-API-Key) con role checking + access logging - Router: auth, users, recipes, tasks, measurements, files, settings - Services: auth (bcrypt+secrets), recipe (copy-on-write versioning), measurement (auto pass/fail con UTL/UWL/LWL/LTL) - Alembic env.py con import modelli attivi - Fix architect review: no double-commit, recipe_id subquery filter, user_id in access logs, type annotations corrette Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
82 lines
1.6 KiB
Python
82 lines
1.6 KiB
Python
"""Pydantic schemas for TieMeasureFlow API."""
|
|
from schemas.measurement import (
|
|
MeasurementBatchCreate,
|
|
MeasurementCreate,
|
|
MeasurementListResponse,
|
|
MeasurementQuery,
|
|
MeasurementResponse,
|
|
)
|
|
from schemas.recipe import (
|
|
RecipeCreate,
|
|
RecipeListResponse,
|
|
RecipeResponse,
|
|
RecipeUpdate,
|
|
RecipeVersionResponse,
|
|
)
|
|
from schemas.statistics import (
|
|
AlertData,
|
|
CapabilityData,
|
|
ControlChartData,
|
|
HistogramData,
|
|
StatisticsQuery,
|
|
StatisticsResponse,
|
|
SummaryData,
|
|
TrendData,
|
|
)
|
|
from schemas.task import (
|
|
SubtaskCreate,
|
|
SubtaskResponse,
|
|
SubtaskUpdate,
|
|
TaskCreate,
|
|
TaskReorderRequest,
|
|
TaskResponse,
|
|
TaskUpdate,
|
|
)
|
|
from schemas.user import (
|
|
LoginRequest,
|
|
LoginResponse,
|
|
UserCreate,
|
|
UserProfileUpdate,
|
|
UserResponse,
|
|
UserUpdate,
|
|
)
|
|
|
|
__all__ = [
|
|
# User schemas
|
|
"UserCreate",
|
|
"UserUpdate",
|
|
"UserProfileUpdate",
|
|
"UserResponse",
|
|
"LoginRequest",
|
|
"LoginResponse",
|
|
# Recipe schemas
|
|
"RecipeCreate",
|
|
"RecipeUpdate",
|
|
"RecipeResponse",
|
|
"RecipeVersionResponse",
|
|
"RecipeListResponse",
|
|
# Task schemas
|
|
"TaskCreate",
|
|
"TaskUpdate",
|
|
"TaskResponse",
|
|
"TaskReorderRequest",
|
|
"SubtaskCreate",
|
|
"SubtaskUpdate",
|
|
"SubtaskResponse",
|
|
# Measurement schemas
|
|
"MeasurementCreate",
|
|
"MeasurementBatchCreate",
|
|
"MeasurementResponse",
|
|
"MeasurementListResponse",
|
|
"MeasurementQuery",
|
|
# Statistics schemas
|
|
"StatisticsQuery",
|
|
"ControlChartData",
|
|
"HistogramData",
|
|
"CapabilityData",
|
|
"TrendData",
|
|
"SummaryData",
|
|
"AlertData",
|
|
"StatisticsResponse",
|
|
]
|