from typing import Optional

# third party
from pydantic import BaseModel


class Token(BaseModel):
    access_token: str
    token_type: str
    metadata: str


class TokenPayload(BaseModel):
    sub: Optional[int] = None

from typing import Optional

# third party
from pydantic import BaseModel


class Token(BaseModel):
    access_token: str
    token_type: str
    metadata: str


class TokenPayload(BaseModel):
    sub: Optional[int] = None
    guest: bool = False

UPDATE TokenPayload pydantic model to support guest flag
UPDATE TokenPayload pydantic model to support guest flag

  from typing import Optional
  
  # third party
  from pydantic import BaseModel
  
  
  class Token(BaseModel):
      access_token: str
      token_type: str
      metadata: str
  
  
  class TokenPayload(BaseModel):
      sub: Optional[int] = None
+     guest: bool = False
  
UPDATE TokenPayload pydantic model to support guest flag
## Code Before:
from typing import Optional

# third party
from pydantic import BaseModel


class Token(BaseModel):
    access_token: str
    token_type: str
    metadata: str


class TokenPayload(BaseModel):
    sub: Optional[int] = None

## Instruction:
UPDATE TokenPayload pydantic model to support guest flag
## Code After:
from typing import Optional

# third party
from pydantic import BaseModel


class Token(BaseModel):
    access_token: str
    token_type: str
    metadata: str


class TokenPayload(BaseModel):
    sub: Optional[int] = None
    guest: bool = False
