using Connected.Annotations; using Connected.Entities; using Connected.Entities.Annotations; using Connected.Security.Membership; namespace Common.Security.Membership; [Table(Schema = SchemaAttribute.SysSchema)] internal sealed record Membership : Entity, IMembership { public const string CacheKey = $"{SchemaAttribute.SysSchema}.{nameof(Membership)}"; [Ordinal(0)] [Index(Name = $"idx_{SchemaAttribute.SysSchema}_{nameof(User)}_{nameof(Role)}", Unique = true)] public int User { get; init; } [Ordinal(1)] [Index(Name = $"idx_{SchemaAttribute.SysSchema}_{nameof(User)}_{nameof(Role)}", Unique = true)] public int Role { get; init; } }