Adding scope import

This commit is contained in:
Ian Roddis committed 2026-07-16 20:15:35 -03:00
1 parent cda15df2ed
commit 69cbfa2d3f
18 files changed
+1165 -3

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
from pydantic import BaseModel
class ScopeImportRowResult(BaseModel):
row: int
product_number: str | None = None
status: str # "created" | "updated" | "skipped" | "error"
messages: list[str] = []
class ScopeImportResult(BaseModel):
created: int
updated: int
skipped: int
errors: int
total: int
rows: list[ScopeImportRowResult] = []
+15
View File
@@ -0,0 +1,15 @@
from pydantic import BaseModel, ConfigDict
class ScopeInfoBase(BaseModel):
magnification_min: float | None = None
magnification_max: float | None = None
model_suffix: str | None = None
objective_thread_pitch: str | None = None
class ScopeInfoRead(ScopeInfoBase):
model_config = ConfigDict(from_attributes=True)
id: int
augmented_part_id: int