from abc import abstractmethod
from typing import Protocol

from template_project.application.notification_device.entity import NotificationDevice
from template_project.application.user.entity import UserId


class NotificationDeviceDataGateway(Protocol):
    @abstractmethod
    async def load_by_user_id(self, user_id: UserId) -> NotificationDevice | None:
        raise NotImplementedError

    @abstractmethod
    async def load_by_user_id_and_device_id(
        self,
        user_id: UserId,
        device_id: str,
    ) -> NotificationDevice | None:
        raise NotImplementedError
