20 lines
457 B
Python
20 lines
457 B
Python
from __future__ import annotations
|
|
|
|
from typing import Protocol
|
|
|
|
from packages.domain import GenerationTask
|
|
|
|
|
|
class GenerationTaskRepository(Protocol):
|
|
def create(self, task: GenerationTask) -> GenerationTask:
|
|
...
|
|
|
|
def get(self, task_id: str) -> GenerationTask | None:
|
|
...
|
|
|
|
def list_by_project(self, project_id: str) -> list[GenerationTask]:
|
|
...
|
|
|
|
def update(self, task: GenerationTask) -> GenerationTask:
|
|
...
|