Spaces:
Running
Running
Commit ·
d990a6b
1
Parent(s): 390c48c
refactor(models): make first_name optional in SystemUserModel
Browse filesTo align with the optional nature of last_name and phone fields, first_name is now also optional. This provides more flexibility when creating user records where first name might not be required.
app/system_users/models/model.py
CHANGED
|
@@ -61,7 +61,7 @@ class SystemUserModel(BaseModel):
|
|
| 61 |
password_hash: str = Field(..., description="Bcrypt hashed password")
|
| 62 |
|
| 63 |
# Personal information
|
| 64 |
-
first_name: str = Field(
|
| 65 |
last_name: Optional[str] = Field(None, description="User last name")
|
| 66 |
phone: Optional[str] = Field(None, description="User phone number (E.164 format)")
|
| 67 |
|
|
@@ -127,4 +127,4 @@ class SystemUserModel(BaseModel):
|
|
| 127 |
"created_by": "system",
|
| 128 |
"created_at": "2024-01-15T08:00:00Z"
|
| 129 |
}
|
| 130 |
-
}
|
|
|
|
| 61 |
password_hash: str = Field(..., description="Bcrypt hashed password")
|
| 62 |
|
| 63 |
# Personal information
|
| 64 |
+
first_name: Optional[str] = Field(None, description="User first name")
|
| 65 |
last_name: Optional[str] = Field(None, description="User last name")
|
| 66 |
phone: Optional[str] = Field(None, description="User phone number (E.164 format)")
|
| 67 |
|
|
|
|
| 127 |
"created_by": "system",
|
| 128 |
"created_at": "2024-01-15T08:00:00Z"
|
| 129 |
}
|
| 130 |
+
}
|