Make last_name optional and add default for first_name.
Updated the schemas and models to make `last_name` optional and set a default value of "user" for `first_name`. This change enhances flexibility for user data handling and ensures proper defaults when values are not provided.
This commit is contained in:
@@ -10,7 +10,7 @@ from pydantic import BaseModel, EmailStr, field_validator, ConfigDict
|
||||
class UserBase(BaseModel):
|
||||
email: EmailStr
|
||||
first_name: str
|
||||
last_name: str
|
||||
last_name: Optional[str] = None
|
||||
phone_number: Optional[str] = None
|
||||
|
||||
@field_validator('phone_number')
|
||||
|
||||
Reference in New Issue
Block a user