from pydantic import BaseModel, Field from typing import Dict from datetime import datetime class ForumMessageCreate(BaseModel): author: str type: str # "text" or "file" data: Dict[str, str] class ForumMessageResponse(BaseModel): id: int author: str type: str data: Dict[str, str] created_at: datetime class Config: from_attributes = True