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:
2025-03-04 18:53:49 +01:00
parent 7d9f4ee4b2
commit 67f1dfbd9d
3 changed files with 4 additions and 4 deletions

View File

@@ -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')