склади и инструмент готовы

This commit is contained in:
2025-12-07 19:36:28 +03:00
parent 54bf21d52d
commit 65a3bc1671
65 changed files with 3485 additions and 115 deletions
+5
View File
@@ -77,6 +77,11 @@ class ToolboxHandler:
toolboxes = await CRUD.read(query, True)
return [toolbox.toDict() for toolbox in toolboxes] if toolboxes else []
async def getIdByOwner(ownerId: int) -> int:
query = select(Toolbox).where(Toolbox.owner_id == ownerId)
toolbox = await CRUD.read(query)
return toolbox.id
async def delete(toolboxId: int, user_id: int = None):
query = select(Toolbox).where(Toolbox.id == toolboxId)
toolbox = await CRUD.read(query)