mirror of
https://github.com/FutureOfMedTech-FITM-hack/backend.git
synced 2024-11-25 15:53:43 +03:00
48 lines
682 B
Python
48 lines
682 B
Python
from datetime import datetime
|
|
|
|
from pydantic import BaseModel, EmailStr
|
|
|
|
|
|
class Token(BaseModel):
|
|
access_token: str
|
|
token_type: str
|
|
|
|
|
|
class TokenData(BaseModel):
|
|
email: EmailStr
|
|
|
|
|
|
class UserBase(BaseModel):
|
|
email: EmailStr
|
|
|
|
|
|
class UserLogin(UserBase):
|
|
password: str
|
|
|
|
|
|
class UserCreate(UserBase):
|
|
password: str
|
|
fullname: str
|
|
gender: str
|
|
born: datetime
|
|
|
|
|
|
class UserPublicInfo(UserBase):
|
|
id: int
|
|
fullname: str | None
|
|
disabled: bool
|
|
|
|
class Config:
|
|
orm_mode = True
|
|
|
|
|
|
class User(UserBase):
|
|
id: int
|
|
fullname: str
|
|
hashed_password: str
|
|
disabled: bool
|
|
is_manager: bool
|
|
|
|
class Config:
|
|
orm_mode = True
|