from pydantic import BaseModel from typing import Annotated, Union class Book(BaseModel): id: int class Token(BaseModel): access_token: str token_type: str class TokenData(BaseModel): email: Union[str, None] = None class User(BaseModel): id: int phone: Union[int, None] = None email: str name: Union[str, None] = None surname: str class Config: orm_mode = True class UserInDB(User): password: str hashed_password: str