from uuid import UUID from sqlalchemy import delete from app.common.base_repository import BaseRepository from app.modules.devices.models import Device class DeviceRepository(BaseRepository[Device]): model = Device async def delete_own(self, account_id: UUID, push_token: str) -> None: await self.session.execute( delete(Device).where(Device.account_id == account_id, Device.push_token == push_token))