using ZB.MOM.WW.ScadaBridge.Commons.Types.Enums;

namespace ZB.MOM.WW.ScadaBridge.Commons.Entities.Notifications;

public class NotificationList
{
    /// <summary>Primary key.</summary>
    public int Id { get; set; }
    /// <summary>Display name of the notification list.</summary>
    public string Name { get; set; }
    /// <summary>Delivery type discriminator (e.g., Email).</summary>
    public NotificationType Type { get; set; } = NotificationType.Email;
    /// <summary>Recipients belonging to this list.</summary>
    public ICollection<NotificationRecipient> Recipients { get; set; } = new List<NotificationRecipient>();

    /// <summary>Initializes the notification list with the given name.</summary>
    /// <param name="name">Display name of the notification list.</param>
    public NotificationList(string name)
    {
        Name = name ?? throw new ArgumentNullException(nameof(name));
    }
}
