feat: аналитика
This commit is contained in:
@@ -132,6 +132,11 @@ class Postgres(DatabaseBase):
|
||||
result = await self.session.execute(q)
|
||||
return list(result.scalars().all())
|
||||
|
||||
async def get_user_external_channels(self, user_id: uuid.UUID) -> list[domain.ExternalChannel]:
|
||||
q = select(domain.ExternalChannel).where(domain.ExternalChannel.user_id == user_id)
|
||||
result = await self.session.execute(q)
|
||||
return list(result.scalars().all())
|
||||
|
||||
async def add_external_channel_to_targets(
|
||||
self, external_channel_id: uuid.UUID, target_channel_ids: list[uuid.UUID]
|
||||
) -> None:
|
||||
@@ -204,7 +209,7 @@ class Postgres(DatabaseBase):
|
||||
return creative
|
||||
|
||||
async def get_user_creatives(
|
||||
self, user_id: uuid.UUID, *, target_channel_id: uuid.UUID | None = None, include_archived: bool = False
|
||||
self, user_id: uuid.UUID, target_channel_id: uuid.UUID | None = None, include_archived: bool = False
|
||||
) -> list[domain.Creative]:
|
||||
q = (
|
||||
select(domain.Creative)
|
||||
@@ -261,7 +266,6 @@ class Postgres(DatabaseBase):
|
||||
async def get_user_placements(
|
||||
self,
|
||||
user_id: uuid.UUID,
|
||||
*,
|
||||
target_channel_id: uuid.UUID | None = None,
|
||||
external_channel_id: uuid.UUID | None = None,
|
||||
creative_id: uuid.UUID | None = None,
|
||||
|
||||
Reference in New Issue
Block a user