from datetime import datetime
from typing import Optional

from pydantic import BaseSettings, HttpUrl
from sqlmodel import Field, SQLModel  # pyright: ignore[reportUnknownVariableType]


class Post(SQLModel):
    id: int
    text: Optional[str]
    photos: list[HttpUrl]
    date: datetime


class PostDB(SQLModel, table=True):
    id: int = 