Adding ISOThread and UNC Thread
This commit is contained in:
1 parent
9285a021c0
commit
35e8a61b1d
22 files changed
+796
-3
No files matched your search
@@ -0,0 +1,23 @@
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
|
||||
class IsoThreadBase(BaseModel):
|
||||
diameter_mm: float = Field(..., gt=0, description="Nominal diameter in mm")
|
||||
pitch_mm: float = Field(..., gt=0, description="Thread pitch in mm")
|
||||
depth_mm: float | None = Field(None, gt=0, description="Thread depth in mm")
|
||||
|
||||
|
||||
class IsoThreadCreate(IsoThreadBase):
|
||||
pass
|
||||
|
||||
|
||||
class IsoThreadUpdate(BaseModel):
|
||||
diameter_mm: float | None = Field(None, gt=0)
|
||||
pitch_mm: float | None = Field(None, gt=0)
|
||||
depth_mm: float | None = Field(None, gt=0)
|
||||
|
||||
|
||||
class IsoThreadRead(IsoThreadBase):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
id: int
|
||||
Reference in new issue
Block a user