Adding scope import
This commit is contained in:
1 parent
cda15df2ed
commit
69cbfa2d3f
18 files changed
+1165
-3
No files matched your search
@@ -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] = []
|
||||
@@ -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
|
||||
Reference in new issue
Block a user