c5f8c50872
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
24 lines
554 B
Python
24 lines
554 B
Python
from pydantic import BaseModel, Field
|
|
|
|
|
|
class CreateGenerationTaskRequest(BaseModel):
|
|
project_id: str = Field(..., min_length=1)
|
|
asset_library_id: str = Field(..., min_length=1)
|
|
strategy_id: str = ""
|
|
voice_library_id: str = ""
|
|
edit_plan_id: str = ""
|
|
created_by_user_id: str = ""
|
|
|
|
|
|
class GenerationTaskResponse(BaseModel):
|
|
id: str
|
|
project_id: str
|
|
asset_library_id: str
|
|
strategy_id: str
|
|
voice_library_id: str
|
|
edit_plan_id: str
|
|
status: str
|
|
progress: float
|
|
result_count: int
|
|
error_message: str
|