from abc import ABC, abstractmethod
from uuid import UUID

from domain.tasks.subtasks import SubTask


class SubTaskRepository(ABC):
    @abstractmethod
    def create(self, subtask: SubTask) -> SubTask: ...

    @abstractmethod
    def get(self, subtask_id: UUID) -> SubTask: ...

    @abstractmethod
    def save(self, subtask: SubTask) -> None: ...

    @abstractmethod
    def list_by_task(self, task_id: UUID) -> list[SubTask]: ...
