feat: enrich member/comment/propose APIs with usernames
- ProjectMemberResponse now includes username and full_name - Comment list endpoint returns author_username - ProposeResponse now includes created_by_username - All serializers resolve User objects to surface human-readable names - Supports frontend code-first migration (TODO §3.1/3.2)
This commit is contained in:
@@ -208,6 +208,8 @@ class ProjectMemberCreate(ProjectMemberBase):
|
||||
class ProjectMemberResponse(BaseModel):
|
||||
id: int
|
||||
user_id: int
|
||||
username: Optional[str] = None
|
||||
full_name: Optional[str] = None
|
||||
project_id: int
|
||||
role: str = "dev"
|
||||
|
||||
@@ -290,6 +292,7 @@ class ProposeResponse(ProposeBase):
|
||||
status: ProposeStatusEnum
|
||||
project_id: int
|
||||
created_by_id: Optional[int] = None
|
||||
created_by_username: Optional[str] = None
|
||||
feat_task_id: Optional[str] = None
|
||||
created_at: datetime
|
||||
updated_at: Optional[datetime] = None
|
||||
|
||||
Reference in New Issue
Block a user