feat: FASE 1 - Backend Core (modelli, auth, API)
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>
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
"""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",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user