from pydantic import BaseModel, ConfigDict, Field


class Token(BaseModel):
    access_token: str
    token_type: str
    model_config = ConfigDict(extra="ignore")


class TokenData(BaseModel):
    id: int
    sub: str = Field(alias="username")
    is_superuser: bool
    is_active: bool

    model_config = ConfigDict(populate_by_name=True)
