using CashLineERP.Domain.Common;

namespace CashLineERP.Domain.Identity;

public sealed class Role : Entity
{
    public long Id { get; private set; }

    public string RoleCode { get; private set; } = string.Empty;

    public string RoleName { get; private set; } = string.Empty;

    public string PortalCode { get; private set; } = string.Empty;

    public bool IsChecker { get; private set; }

    public bool IsActive { get; private set; } = true;

    public List<UserRole> UserAssignments { get; private set; } = [];

    public Role(long id, string roleCode, string roleName, string portalCode, bool isChecker)
    {
        Id = id;
        RoleCode = roleCode;
        RoleName = roleName;
        PortalCode = portalCode;
        IsChecker = isChecker;
    }

    private Role()
    {
    }
}
