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

public class NotificationRecipient
{
    /// <summary>Gets or sets the database primary key.</summary>
    public int Id { get; set; }
    /// <summary>Gets or sets the id of the parent notification list.</summary>
    public int NotificationListId { get; set; }
    /// <summary>Gets or sets the display name of the recipient.</summary>
    public string Name { get; set; }
    /// <summary>Gets or sets the recipient's email address.</summary>
    public string EmailAddress { get; set; }

    /// <summary>
    /// Initializes a new <see cref="NotificationRecipient"/> with the required fields.
    /// </summary>
    /// <param name="name">Display name of the recipient.</param>
    /// <param name="emailAddress">Email address of the recipient.</param>
    public NotificationRecipient(string name, string emailAddress)
    {
        Name = name ?? throw new ArgumentNullException(nameof(name));
        EmailAddress = emailAddress ?? throw new ArgumentNullException(nameof(emailAddress));
    }
}
