from datetime import datetime
from typing import Optional

from pydantic import BaseModel


class Token(BaseModel):
    access_token: str
    token_type: str = "bearer"
    expires_in: Optional[int] = None
    user: dict


class TokenPayload(BaseModel):
    sub: int
    exp: datetime
    type: str


class TokenRefresh(BaseModel):
    access_token: str
    expires_in: Optional[int] = None
