using Monitoring.Core.Domain.RolePrimitives;

namespace Monitoring.Core.Domain;

public class Role
{
	public RoleId Id { get; } = default!;
	public RoleName Name { get; } = default!;
	public RoleUpperCaseName UpperCaseName { get; } = default!;

	public List<User> Users { get; } = [];

	public static Role Create(RoleId id, RoleName name)
	{
		return new Role(id, name);
	}

	private Role(RoleId id, RoleName name)
	{
		Id = id;
		Name = name;
		UpperCaseName = RoleUpperCaseName.Create(name.Value);
	}
}
