using ZB.MOM.WW.OtOpcUa.Configuration.Enums;
namespace ZB.MOM.WW.OtOpcUa.Configuration.Entities;
///
/// One ACL grant: a principal gets a set of at a specific scope.
/// Generation-versioned per decision. See acl-design.md for evaluation algorithm.
///
public sealed class NodeAcl
{
/// Gets or sets the database row ID for this ACL entry.
public Guid NodeAclRowId { get; set; }
/// Gets or sets the logical ID of this ACL entry.
public required string NodeAclId { get; set; }
/// Gets or sets the cluster ID for this ACL entry.
public required string ClusterId { get; set; }
/// Gets or sets the principal (API-key principal name, or the reserved anonymous) this ACL entry grants to.
public required string Principal { get; set; }
/// Gets or sets the scope kind for this ACL entry.
public required NodeAclScopeKind ScopeKind { get; set; }
/// NULL when = ; otherwise the scoped entity's logical ID.
public string? ScopeId { get; set; }
/// Bitmask of . Stored as int in SQL.
public required NodePermissions PermissionFlags { get; set; }
/// Gets or sets optional notes for this ACL entry.
public string? Notes { get; set; }
/// Optimistic concurrency token for last-write-wins detection in the v2 live-edit model.
public byte[] RowVersion { get; set; } = Array.Empty();
}