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
21 lines
499 B
Python
21 lines
499 B
Python
from pydantic import BaseModel, Field
|
|
|
|
|
|
class CreateAssetLibraryRequest(BaseModel):
|
|
workspace_id: str = Field(..., min_length=1)
|
|
project_id: str = Field(..., min_length=1)
|
|
name: str = Field(..., min_length=1, max_length=100)
|
|
kind: str = Field(..., pattern="^(video|voice)$")
|
|
|
|
|
|
class AssetLibraryResponse(BaseModel):
|
|
id: str
|
|
workspace_id: str
|
|
project_id: str
|
|
name: str
|
|
kind: str
|
|
|
|
|
|
class ListAssetLibrariesResponse(BaseModel):
|
|
items: list[AssetLibraryResponse]
|