API/app/models.py

20 lines
336 B
Python

from pydantic import BaseModel
from typing import Optional
class Token(BaseModel):
access_token: str
token_type: str
class TokenData(BaseModel):
username: Optional[str] = None
class User(BaseModel):
username: str
disabled: Optional[bool] = None
servers: list
class UserInDB(User):
hashed_password: str