Path: redb/redb.Tests.Integration/Models/EnumKeyModels.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.Tests.Integration/Models/EnumKeyModels.cs
----
using redb.Core.Attributes;
namespace redb.Tests.Integration.Models;
/// An enum key with explicit values out of name order.
public enum KeyShade { Red = 3, Green = 1, Blue = 2 }
/// A flags enum key: a combination is stored as one key.
[Flags]
public enum KeyAccess { None = 0, Read = 1, Write = 2, Admin = 4 }
/// Dictionaries keyed by an enum, a flags enum and a nullable enum.
[RedbScheme("TestEnumKeys")]
public class EnumKeyProps
{
public string Marker { get; set; } = string.Empty;
public Dictionary? ByShade { get; set; }
public Dictionary? EntryByShade { get; set; }
public Dictionary? ByAccess { get; set; }
public Dictionary? ByMaybeShade { get; set; }
}