Adding sub-parts
This commit is contained in:
1 parent
45bc5bf8f6
commit
c8696e67b5
14 files changed
+436
-2
No files matched your search
@@ -0,0 +1,24 @@
|
||||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from app.schemas.part_type import PartTypeRead
|
||||
|
||||
|
||||
class SubPartTypeBase(BaseModel):
|
||||
name: str
|
||||
part_type_id: int
|
||||
|
||||
|
||||
class SubPartTypeCreate(SubPartTypeBase):
|
||||
pass
|
||||
|
||||
|
||||
class SubPartTypeUpdate(BaseModel):
|
||||
name: str | None = None
|
||||
part_type_id: int | None = None
|
||||
|
||||
|
||||
class SubPartTypeRead(SubPartTypeBase):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
id: int
|
||||
part_type: PartTypeRead
|
||||
Reference in new issue
Block a user