You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Connected.Common/Common/Security/Membership/Membership.cs

21 lines
655 B

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<int>, 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; }
}