Added archived field to spools

Resolves #13
This commit is contained in:
Donkie
2023-07-14 14:19:57 +02:00
parent 061061cd31
commit f89cf8ecd4
6 changed files with 42 additions and 1 deletions

View File

@@ -150,6 +150,7 @@ class Spool(BaseModel):
description="Free text comment about this specific spool.",
example="",
)
archived: bool = Field(description="Whether this spool is archived and should not be used anymore.")
@staticmethod
def from_db(item: models.Spool) -> "Spool":
@@ -185,6 +186,7 @@ class Spool(BaseModel):
location=item.location,
lot_nr=item.lot_nr,
comment=item.comment,
archived=item.archived if item.archived is not None else False,
)