from datetime import datetime

from sqlmodel import Field, SQLModel


class User(SQLModel, table=True):
    __tablename__: str = 'users'  # type: ignore

    id: int = Field(default=None, primary_key=True)
    vita_id: str = Field(unique=True)


class UserDocument(SQLModel, table=True):
    __tablename__: str = 'user_documents'  # type: ignore

    id: int = Field(default=None, primary_key=True)
    user_id: str = Field()
    token: str
    base64: str | None = Field(default=None)
    created_at: datetime
