from datetime import datetime from pydantic import BaseModel, Field class User(BaseModel): id: int telegram_id: int = Field( exclude=True, ) first_name: str last_name: str username: str class PollSchema(BaseModel): id: int name: str question: str class PollOption(BaseModel): id: int poll_schema: PollSchema name: str ordinal: int class Poll(BaseModel): id: int telegram_message_id: int = Field( exclude=True, ) telegram_poll_id: str = Field( exclude=True, ) poll_schema: PollSchema created_at: datetime is_complete: bool class PollAnswer(BaseModel): id: int poll: Poll user: User poll_option: list[PollOption]