API/app/models.py

20 lines
336 B
Python
Raw Normal View History

2021-12-03 12:53:55 +00:00
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
2022-01-11 04:18:26 +00:00
servers: list
2021-12-03 12:53:55 +00:00
class UserInDB(User):
hashed_password: str