feat: убираем денормализацию (антипреждевременная оптимизация)

This commit is contained in:
Artem Tsyrulnikov
2025-12-16 10:04:20 +03:00
parent 2339471956
commit 18b30eaf7f
26 changed files with 295 additions and 232 deletions

View File

@@ -44,6 +44,8 @@ async def update_placement(
if placement.post:
ad_post_url = generate_post_url(placement.post.channel.username, placement.post.message_id)
subscriptions_count = await self.database.count_subscriptions_by_placement(placement.id)
return dto.PlacementOutput(
id=placement.id,
project_id=placement.project_id,
@@ -59,6 +61,6 @@ async def update_placement(
invite_link_type=placement.invite_link_type,
invite_link=placement.invite_link,
status=placement.status,
subscriptions_count=placement.subscriptions_count,
subscriptions_count=subscriptions_count,
created_at=placement.created_at,
)