Path: redb/redb.Core/Models/Users/UpdateUserRequest.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Core/Models/Users/UpdateUserRequest.cs
----
using System;
using redb.Core.Models.Contracts;
namespace redb.Core.Models.Users
{
///
/// Request for updating user data
///
public class UpdateUserRequest
{
///
/// New user login (if null - not changed)
/// System users (ID 0, 1) cannot change login
///
public string? Login { get; set; }
///
/// New user name (if null - not changed)
/// System users (ID 0, 1) cannot change name
///
public string? Name { get; set; }
///
/// New user phone (if null - not changed)
///
public string? Phone { get; set; }
///
/// New user email (if null - not changed)
///
public string? Email { get; set; }
///
/// New activity status (if null - not changed)
///
public bool? Enabled { get; set; }
///
/// Dismissal date (if null - not changed)
///
public DateTimeOffset? DateDismiss { get; set; }
///
/// New user roles as objects (if null - not changed)
/// For backward compatibility and programmatic usage
/// If empty array is specified - all roles are removed
///
public IRedbRole[]? Roles { get; set; }
///
/// Names of new user roles (if null - not changed)
/// Example: ["Admin", "Manager"]
/// If both Roles and RoleNames are specified - RoleNames are used (priority)
/// If empty array is specified - all roles are removed
///
public string[]? RoleNames { get; set; }
// === NEW EXTENDED FIELDS ===
///
/// New additional key (if null - not changed)
///
public long? Key { get; set; }
///
/// New integer code (if null - not changed)
///
public long? CodeInt { get; set; }
///
/// New string code (if null - not changed)
/// If empty string - code is cleared
///
public string? CodeString { get; set; }
///
/// New GUID code (if null - not changed)
///
public Guid? CodeGuid { get; set; }
///
/// New note (if null - not changed)
/// If empty string - note is cleared
///
public string? Note { get; set; }
// Hash is NOT added to UpdateUserRequest - it is recalculated automatically!
}
}