Class UpdateUserRequest
- Namespace
- Builvero.Application.DTOs.Admin
- Assembly
- Builvero.Application.dll
Request model for updating a user account by an administrator.
public class UpdateUserRequest
- Inheritance
-
UpdateUserRequest
- Inherited Members
Remarks
This DTO is used by the admin user update endpoint. Only provided fields are updated. Null values indicate that the field should not be changed. Password is hashed before storage.
Properties
Gets or sets the new email address for the user, or null to leave unchanged.
public string? Email { get; set; }
Property Value
- string
- Request model for updating a user account by an administrator.
Remarks
If provided, must be a valid email format and must not already be registered by another user.
Password
Gets or sets the new password for the user, or null to leave unchanged.
public string? Password { get; set; }
Property Value
- string
- Request model for updating a user account by an administrator.
Remarks
If provided, must be at least 8 characters long. The password will be hashed using BCrypt before storage.
Role
Gets or sets the new role for the user as a string (e.g., "User", "Admin", "Moderator"), or null to leave unchanged.
public string? Role { get; set; }
Property Value
- string
- Request model for updating a user account by an administrator.
Remarks
Must match a valid UserRole enum value name (case-sensitive).
Status
Gets or sets the new status for the user as a string (e.g., "Active", "Blocked", "PendingVerification"), or null to leave unchanged.
public string? Status { get; set; }
Property Value
- string
- Request model for updating a user account by an administrator.
Remarks
Must match a valid UserStatus enum value name (case-sensitive).