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

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
@@ -58,6 +58,11 @@ class CategoryHandler:
categories = await CRUD.read(query, True)
return [category.toDict() for category in categories] if categories else []
async def getSeveral(categoryIds: list[int]) -> list[dict]:
query = select(Category).where(Category.id.in_(categoryIds))
categories = await CRUD.read(query, True)
return [category.toDict() for category in categories] if categories else []
async def delete(categoryId: int, user_id: int = None):
query = select(Category).where(Category.id == categoryId)
category = await CRUD.read(query)