Path: redb/redb.Core/Models/Users/CreateUserRequest.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/CreateUserRequest.cs ---- using System; using redb.Core.Models.Contracts; namespace redb.Core.Models.Users { /// /// Request for creating new user /// public class CreateUserRequest { /// /// User login (unique) /// public string Login { get; set; } = ""; /// /// User password (in plain text, will be hashed) /// public string Password { get; set; } = ""; /// /// User name /// public string Name { get; set; } = ""; /// /// User phone (optional) /// public string? Phone { get; set; } /// /// User email (optional) /// public string? Email { get; set; } /// /// Is user active upon creation /// public bool Enabled { get; set; } = true; /// /// Roles to assign to user upon creation (objects) /// For backward compatibility and programmatic usage /// public IRedbRole[]? Roles { get; set; } /// /// Role names to assign to user upon creation /// Example: ["Admin", "Manager", "User"] /// If both Roles and RoleNames are specified - RoleNames are used (priority) /// public string[]? RoleNames { get; set; } /// /// Registration date (if not specified, current date is used) /// public DateTimeOffset? DateRegister { get; set; } // === NEW EXTENDED FIELDS === /// /// Additional user key (optional) /// Can be used for external integrations or additional identification /// public long? Key { get; set; } /// /// Integer user code (optional) /// Can be used for categorization, access groups or external systems /// public long? CodeInt { get; set; } /// /// String user code (optional) /// Can be used for department codes, branches or special labels /// public string? CodeString { get; set; } /// /// GUID user code (optional) /// Can be used for unique identification in distributed systems /// public Guid? CodeGuid { get; set; } /// /// Note or comment for user (optional) /// Can contain additional information, instructions or notes /// public string? Note { get; set; } // Hash is NOT added to CreateUserRequest - it is generated automatically! } }