- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser.py
More file actions
Latest commit
22 lines (14 loc) · 383 Bytes
/
Copy pathuser.py
File metadata and controls
22 lines (14 loc) · 383 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
frompydanticimportEmailStr
fromsqlmodelimportField, SQLModel
classUserBase(SQLModel):
username: str
email_address: EmailStr
first_name: str
last_name: str
classUser(UserBase, table=True):
id: int=Field(default=None, primary_key=True)
hashed_password: str
classUserPublic(UserBase):
id: int
classUserCreate(UserBase):
password: str