Silos/backend/app/schemas/collaboration.py
AnuragJangid18 809235e962 feat: implement comments and activity panel in workspace
- Added CommentsPanel component for managing comments on documents.
- Integrated comment creation, deletion, and resolution functionalities.
- Implemented activity tracking for document interactions.
- Enhanced SketchPage with editing and saving capabilities.
- Introduced template management API endpoints for creating, sharing, and deleting templates.
- Added runtime validation report for frontend and backend.
- Created GettingStartedPanel for user onboarding with template options.
- Implemented Playwright E2E tests for accessibility and export functionality.
2026-10-22 21:18:10 +05:30

44 lines
842 B
Python

from datetime import datetime
from pydantic import BaseModel, Field
class CommentCreate(BaseModel):
body: str = Field(min_length=1, max_length=5000)
parent_id: str | None = None
class CommentResponse(BaseModel):
id: str
document_id: str
body: str
parent_id: str | None = None
author_id: int
author_name: str
created_at: datetime
updated_at: datetime
resolved: bool = False
class CommentResolveRequest(BaseModel):
resolved: bool
class NotificationResponse(BaseModel):
id: str
kind: str
message: str
document_id: str | None = None
comment_id: str | None = None
actor_name: str
read: bool
created_at: datetime
class ActivityResponse(BaseModel):
id: str
document_id: str
kind: str
message: str
actor_name: str
created_at: datetime