Enables multi-user project collaboration mirroring the shared calendar pattern. Includes ProjectMember model with permission levels, task assignment with auto-membership, optimistic locking, field allowlist for assignees, disconnect cascade, delta polling for projects and calendars, and full frontend integration with share sheet, assignment picker, permission gating, and notification handling. Migrations: 057 (indexes + version + comment user_id), 058 (project_members), 059 (project_task_assignments) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
20 lines
450 B
Python
20 lines
450 B
Python
from pydantic import BaseModel, ConfigDict, Field
|
|
from datetime import datetime
|
|
|
|
|
|
class TaskAssignmentCreate(BaseModel):
|
|
model_config = ConfigDict(extra="forbid")
|
|
|
|
user_ids: list[int] = Field(min_length=1, max_length=20)
|
|
|
|
|
|
class TaskAssignmentResponse(BaseModel):
|
|
id: int
|
|
task_id: int
|
|
user_id: int
|
|
assigned_by: int
|
|
user_name: str | None = None
|
|
created_at: datetime
|
|
|
|
model_config = ConfigDict(from_attributes=True)
|