namespace ZB.MOM.WW.ScadaBridge.Commons.Entities.Security;
public class LdapGroupMapping
{
/// Gets or sets the primary key.
public int Id { get; set; }
/// Gets or sets the LDAP/AD group CN that this mapping targets.
public string LdapGroupName { get; set; }
/// Gets or sets the ScadaBridge role name this group maps to.
public string Role { get; set; }
// Parameterless constructor for EF Core seed data
private LdapGroupMapping() { LdapGroupName = null!; Role = null!; }
/// Initializes a new linking an LDAP group to a ScadaBridge role.
/// The LDAP group name (CN).
/// The ScadaBridge role name to assign.
public LdapGroupMapping(string ldapGroupName, string role)
{
LdapGroupName = ldapGroupName ?? throw new ArgumentNullException(nameof(ldapGroupName));
Role = role ?? throw new ArgumentNullException(nameof(role));
}
}