phase 14
This commit is contained in:
@@ -106,3 +106,49 @@ class GroupResponse(BaseModel):
|
||||
member_count: int = Field(default=0, description="Number of images in group")
|
||||
created_at: datetime
|
||||
updated_at: datetime
|
||||
|
||||
|
||||
class ShareLinkCreate(BaseModel):
|
||||
"""Schema for creating a new share link."""
|
||||
|
||||
permission_level: str = Field(..., pattern=r"^(view-only|view-comment)$", description="Permission level")
|
||||
expires_at: datetime | None = Field(None, description="Optional expiration datetime")
|
||||
|
||||
|
||||
class ShareLinkResponse(BaseModel):
|
||||
"""Response schema for share link."""
|
||||
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
id: UUID
|
||||
board_id: UUID
|
||||
token: str
|
||||
permission_level: str
|
||||
created_at: datetime
|
||||
expires_at: datetime | None = None
|
||||
last_accessed_at: datetime | None = None
|
||||
access_count: int = 0
|
||||
is_revoked: bool = False
|
||||
|
||||
|
||||
class CommentCreate(BaseModel):
|
||||
"""Schema for creating a new comment."""
|
||||
|
||||
author_name: str = Field(..., min_length=1, max_length=100, description="Commenter name")
|
||||
content: str = Field(..., min_length=1, max_length=5000, description="Comment text")
|
||||
position: dict | None = Field(None, description="Optional canvas position {x, y}")
|
||||
|
||||
|
||||
class CommentResponse(BaseModel):
|
||||
"""Response schema for comment."""
|
||||
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
id: UUID
|
||||
board_id: UUID
|
||||
share_link_id: UUID | None = None
|
||||
author_name: str
|
||||
content: str
|
||||
position: dict | None = None
|
||||
created_at: datetime
|
||||
is_deleted: bool = False
|
||||
|
||||
Reference in New Issue
Block a user