Path: redb/redb.Core/Models/Users/UserSearchCriteria.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/UserSearchCriteria.cs ---- using System; namespace redb.Core.Models.Users { /// /// User search criteria /// public class UserSearchCriteria { /// /// Search by login (partial match) /// public string? LoginPattern { get; set; } /// /// Search by name (partial match) /// public string? NamePattern { get; set; } /// /// Search by email (partial match) /// public string? EmailPattern { get; set; } /// /// Exact match by login (case-insensitive) /// public string? LoginExact { get; set; } /// /// Exact match by name (case-insensitive) /// public string? NameExact { get; set; } /// /// Exact match by email (case-insensitive) /// public string? EmailExact { get; set; } /// /// Login starts with (case-insensitive) /// public string? LoginStartsWith { get; set; } /// /// Name starts with (case-insensitive) /// public string? NameStartsWith { get; set; } /// /// Email starts with (case-insensitive) /// public string? EmailStartsWith { get; set; } /// /// Not equal by login (case-insensitive) /// public string? LoginNotEqual { get; set; } /// /// Not equal by name (case-insensitive) /// public string? NameNotEqual { get; set; } /// /// Not equal by email (case-insensitive) /// public string? EmailNotEqual { get; set; } /// /// Filter by activity status /// null - all users, true - only active, false - only inactive /// public bool? Enabled { get; set; } /// /// Filter by role (role ID) /// public long? RoleId { get; set; } /// /// Filter by registration date (from) /// public DateTimeOffset? RegisteredFrom { get; set; } /// /// Filter by registration date (to) /// public DateTimeOffset? RegisteredTo { get; set; } /// /// Exclude system users (ID 0, 1) /// public bool ExcludeSystemUsers { get; set; } = true; // === NEW FIELDS FOR FILTERING === /// /// Filter by user key (exact match) /// public long? KeyValue { get; set; } /// /// Filter by integer code (exact match) /// public long? CodeIntValue { get; set; } /// /// Search by string code (partial match) /// public string? CodeStringPattern { get; set; } /// /// Search by note (partial match) /// public string? NotePattern { get; set; } /// /// Filter by GUID code (exact match, rarely used) /// public Guid? CodeGuidValue { get; set; } /// /// Maximum number of results (0 = no limit) /// public int Limit { get; set; } = 100; /// /// Offset for pagination /// public int Offset { get; set; } = 0; /// /// Field for sorting /// public UserSortField SortBy { get; set; } = UserSortField.Name; /// /// Sort direction /// public UserSortDirection SortDirection { get; set; } = UserSortDirection.Ascending; } /// /// Fields for sorting users /// public enum UserSortField { Id, Login, Name, Email, DateRegister, DateDismiss, Enabled, // === NEW FIELDS FOR SORTING === Key, CodeInt, CodeString, Note // Hash not added - technical field // CodeGuid rarely used for sorting } /// /// User sort direction /// public enum UserSortDirection { Ascending, Descending } }