-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.py
More file actions
26 lines (19 loc) · 655 Bytes
/
Copy pathmodels.py
File metadata and controls
26 lines (19 loc) · 655 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import uuid
from typing import Optional
from fastapi_users.schemas import BaseUser, BaseUserCreate, BaseUserUpdate
from pydantic import Field, EmailStr
class User(BaseUser):
id: uuid.UUID = Field(default_factory=uuid.uuid4)
email: EmailStr
hashed_password: str
is_active: bool = True
is_superuser: bool = False
is_verified: bool = False
first_name: Optional[str] = None
last_name: Optional[str] = None
class UserCreate(BaseUserCreate):
first_name: Optional[str] = None
last_name: Optional[str] = None
class UserUpdate(BaseUserUpdate):
first_name: Optional[str] = None
last_name: Optional[str] = None