Silos/backend/app/schemas/template.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

24 lines
675 B
Python

from datetime import datetime
from typing import Any
from pydantic import BaseModel, Field
class TemplateCreate(BaseModel):
name: str = Field(min_length=1, max_length=120)
description: str = Field(default="", max_length=500)
category: str = Field(default="General", min_length=1, max_length=60)
emoji: str = Field(default="📄", max_length=8)
content: dict[str, Any] = Field(default_factory=dict)
class TemplateResponse(TemplateCreate):
id: str
owner_id: int
created_at: datetime
updated_at: datetime
members: list[dict[str, Any]] = Field(default_factory=list)
class TemplateShareRequest(BaseModel):
email_or_username: str