b5a62ee9a3
- domain: User, Workspace, Project, AssetLibrary, Asset, IngestJob - ports: repository interfaces - application: use cases - adapters: in-memory - API: FastAPI 5 routes - worker: Celery ingest_asset - tests: 4 passing
14 lines
351 B
Python
14 lines
351 B
Python
from __future__ import annotations
|
|
|
|
from typing import Protocol
|
|
|
|
from packages.domain import Project
|
|
|
|
|
|
class ProjectRepository(Protocol):
|
|
def list_by_workspace(self, workspace_id: str) -> list[Project]:
|
|
"""List projects for a workspace."""
|
|
|
|
def create(self, project: Project) -> Project:
|
|
"""Persist a project and return it."""
|