feat: cards, attributes and modules

This commit is contained in:
2025-02-19 14:46:31 +04:00
parent a509a3a586
commit 1af78ce08a
61 changed files with 3212 additions and 2795 deletions

View File

@@ -192,8 +192,8 @@ class ServiceService(BaseService):
category_dict = raw_category.model_dump()
del category_dict['id']
last_deal_service_rank = await self.session.scalar(
select(ServiceCategory.deal_service_rank)
.order_by(ServiceCategory.deal_service_rank.desc())
select(ServiceCategory.card_service_rank)
.order_by(ServiceCategory.card_service_rank.desc())
.limit(1)
)
last_product_service_rank = await self.session.scalar(
@@ -338,7 +338,7 @@ class ServiceService(BaseService):
if not request.move_down and not request.move_up:
return ServiceCategoryReorderResponse(ok=False, message="Не указано действие")
if request.service_type == ServiceType.DEAL_SERVICE:
order_by = ServiceCategory.deal_service_rank
order_by = ServiceCategory.card_service_rank
rank_field = 'deal_service_rank'
else:
order_by = ServiceCategory.product_service_rank