from datetime import datetime from typing import Optional, List from pydantic import BaseModel, Field class BlockerCreate(BaseModel): reason: str = Field(..., min_length=1, max_length=2000) class BlockerResolve(BaseModel): resolution_note: str = Field(..., min_length=1, max_length=2000) class BlockerUserInfo(BaseModel): id: str name: str email: str class Config: from_attributes = True class BlockerResponse(BaseModel): id: str task_id: str reason: str resolution_note: Optional[str] created_at: datetime resolved_at: Optional[datetime] reporter: BlockerUserInfo resolver: Optional[BlockerUserInfo] class Config: from_attributes = True class BlockerListResponse(BaseModel): blockers: List[BlockerResponse] total: int