2023-07-09 13:15:39 -07:00
|
|
|
from pydantic import BaseModel
|
|
|
|
|
2023-07-09 16:42:44 -07:00
|
|
|
|
2023-07-09 13:15:39 -07:00
|
|
|
class User(BaseModel):
|
|
|
|
username: str
|
|
|
|
full_name: str
|
|
|
|
email: str
|
2023-07-09 16:42:44 -07:00
|
|
|
disabled: bool = False
|
|
|
|
|
|
|
|
|
|
|
|
class UserCreate(BaseModel):
|
|
|
|
username: str
|
|
|
|
full_name: str
|
|
|
|
email: str
|
|
|
|
password: str
|
2023-07-09 13:15:39 -07:00
|
|
|
|
|
|
|
|
|
|
|
class UserInDB(User):
|
|
|
|
hashed_password: str
|
|
|
|
|
|
|
|
|
|
|
|
class TokenData(BaseModel):
|
|
|
|
username: str
|
|
|
|
|
|
|
|
|
|
|
|
class Token(BaseModel):
|
|
|
|
access_token: str
|
|
|
|
token_type: str
|