16 lines
425 B
Python
16 lines
425 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: ...
|