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