0422967229
BREAKING CHANGES:
- Removed Workspace, WorkspaceMember, WorkspaceInvitation entities
- Project now has owner_user_id instead of workspace_id
- Added shared_users list to Project for collaboration
- Subscription/quota moved from Workspace to User level
Changes:
- packages/domain/entities.py: Removed Workspace entities, updated Project
- packages/adapters/sqlalchemy_impl/models.py: Updated models
- packages/application/: Removed workspace use cases, updated other use cases
- packages/ports/: Removed workspace repository interfaces
- apps/api/: Updated routes, schemas, dependencies, router
- alembic/versions/007_remove_workspace_concept.py: Database migration
New APIs:
- POST /projects/{id}/share: Share project with user
- DELETE /projects/{id}/share/{user_id}: Unshare project
21 lines
475 B
Python
21 lines
475 B
Python
from pydantic import BaseModel, Field
|
|
|
|
|
|
class CreateAssetLibraryRequest(BaseModel):
|
|
project_id: str = Field(..., min_length=1)
|
|
name: str = Field(..., min_length=1, max_length=100)
|
|
kind: str = Field(..., pattern="^(video|voice|image)$")
|
|
|
|
|
|
class AssetLibraryResponse(BaseModel):
|
|
id: str
|
|
project_id: str
|
|
name: str
|
|
kind: str
|
|
asset_count: int
|
|
total_size: int
|
|
|
|
|
|
class ListAssetLibrariesResponse(BaseModel):
|
|
items: list[AssetLibraryResponse]
|