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/Permissions/Permission.cs

37 lines
991 B

using Connected.Annotations;
using Connected.Entities.Annotations;
using Connected.Entities.Consistency;
using Connected.Security.Permissions;
namespace Common.Security.Permissions;
[Table(Schema = SchemaAttribute.SysSchema)]
internal sealed record Permission : ConsistentEntity<int>, IPermission
{
public const string CacheKey = $"{SchemaAttribute.SysSchema}.{nameof(Permission)}";
[Ordinal(0), Length(32)]
public string Evidence { get; init; } = default!;
[Ordinal(1), Length(32)]
public string Schema { get; init; } = default!;
[Ordinal(2), Length(32)]
public string Claim { get; init; } = default!;
[Ordinal(3), Length(256), Nullable]
public string? PrimaryKey { get; init; }
[Ordinal(4), Length(256), Nullable]
public string? Entity { get; init; }
[Ordinal(5)]
public PermissionValue Value { get; init; }
[Ordinal(6), Length(256), Nullable]
public string? Component { get; init; }
[Ordinal(7), Length(256), Nullable]
public string? Method { get; init; }
}