<filename>whist/server/database/token.py
"""Token models"""
from typing import Optional

from pydantic import BaseModel


class Token(BaseModel):
    """
    DO of a token.
    """
    access_token: str
    token_type: str


class TokenData(BaseModel):
    """
    DAO of a token. Is linked to a user.
    """
    username: Optional[str] = None

<filename>whist/server/database/token.py
"""Token models"""
from typing import Optional

from pydantic import BaseModel


class Token(BaseModel):
    """
    DO of a token.
    """
    access_token: str
    token_type: str


class TokenData(BaseModel):
    """
    DAO of a token. Is linked to a user.
    """
    username: Optional[str] = None

Token models DO of a token. DAO of a token. Is linked to a user.