from pydantic import BaseModel from typing import Optional, List # Video Schemas class VideoBase(BaseModel): title: str url: str description: Optional[str] = None class VideoCreate(VideoBase): pass class Video(VideoBase): id: int class Config: orm_mode = True # Comment Schemas class CommentBase(BaseModel): video_id: int user: str text: str timestamp: Optional[str] = None class CommentCreate(CommentBase): pass class Comment(CommentBase): id: int is_toxic: bool toxicity_score: float flagged_reason: Optional[str] = None class Config: orm_mode = True