22 lines
761 B
C#
22 lines
761 B
C#
using EnvelopeGenerator.Domain.Constants;
|
|
using EnvelopeGenerator.Domain.Entities;
|
|
using MediatR;
|
|
|
|
namespace EnvelopeGenerator.Application.Common.Notifications.EnvelopeDeleted;
|
|
|
|
public record EnvelopeDeletedNotification : INotification, ISendMailNotification
|
|
{
|
|
public required Envelope Envelope { get; init; }
|
|
|
|
public required EnvelopeReceiver EnvelopeReceiver { get; init; }
|
|
|
|
public required string Reason { get; init; }
|
|
|
|
public required string SenderReference { get; init; }
|
|
|
|
public EmailTemplateType TemplateType => EmailTemplateType.DocumentDeleted;
|
|
|
|
public string EmailAddress => EnvelopeReceiver.Receiver?.EmailAddress
|
|
?? throw new InvalidOperationException("Receiver email is missing for EnvelopeDeletedNotification.");
|
|
}
|