mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
Update: UserCreate installation model to fix parameter runtime errors.
This commit is contained in:
parent
b07b4500fa
commit
6d76a6f19b
4 changed files with 14 additions and 17 deletions
|
|
@ -1,5 +1,5 @@
|
|||
from typing import Optional
|
||||
from pydantic import BaseModel
|
||||
from pydantic import BaseModel, EmailStr
|
||||
from sqlmodel import Field, SQLModel
|
||||
|
||||
from src.db.roles import RoleRead
|
||||
|
|
@ -10,12 +10,14 @@ class UserBase(SQLModel):
|
|||
username: str
|
||||
first_name: str
|
||||
last_name: str
|
||||
email: str
|
||||
email: EmailStr
|
||||
avatar_image: Optional[str] = ""
|
||||
bio: Optional[str] = ""
|
||||
|
||||
|
||||
class UserCreate(UserBase):
|
||||
first_name: str = ""
|
||||
last_name: str = ""
|
||||
password: str
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue