40 lines
1.3 KiB
Python
40 lines
1.3 KiB
Python
from pydantic import BaseModel, ConfigDict
|
|
|
|
from app.schemas.attachment_point_name import AttachmentPointNameRead
|
|
from app.schemas.clamp_connection import ClampConnectionRead
|
|
from app.schemas.iso_thread import IsoThreadRead
|
|
from app.schemas.static_connection import StaticConnectionRead
|
|
from app.schemas.unc_thread import UncThreadRead
|
|
|
|
|
|
class AttachmentPointBase(BaseModel):
|
|
augmented_part_id: int
|
|
attachment_point_name_id: int
|
|
iso_thread_id: int | None = None
|
|
unc_thread_id: int | None = None
|
|
clamp_connection_id: int | None = None
|
|
static_connection_id: int | None = None
|
|
|
|
|
|
class AttachmentPointCreate(AttachmentPointBase):
|
|
pass
|
|
|
|
|
|
class AttachmentPointUpdate(BaseModel):
|
|
augmented_part_id: int | None = None
|
|
attachment_point_name_id: int | None = None
|
|
iso_thread_id: int | None = None
|
|
unc_thread_id: int | None = None
|
|
clamp_connection_id: int | None = None
|
|
static_connection_id: int | None = None
|
|
|
|
|
|
class AttachmentPointRead(AttachmentPointBase):
|
|
model_config = ConfigDict(from_attributes=True)
|
|
id: int
|
|
attachment_point_name: AttachmentPointNameRead
|
|
iso_thread: IsoThreadRead | None = None
|
|
unc_thread: UncThreadRead | None = None
|
|
clamp_connection: ClampConnectionRead | None = None
|
|
static_connection: StaticConnectionRead | None = None
|