- Updated `CreateEnvelopeReceiverCommand` to specify response type for `IRequest`. - Enhanced `CreateEnvelopeReceiverCommandHandler` to use `AutoMapper` and return `CreateEnvelopeReceiverResponse`. - Modified `Handle` method to map envelope data and populate recipient lists. - Changed `CreateEnvelopeReceiverResponse` to inherit from `CreateEnvelopeResponse` and added new properties. - Adjusted mapping profile to map `Envelope` to `CreateEnvelopeReceiverResponse`. - Created new mapping profile for `Receiver` to `ReceiverReadDto`.
40 lines
1.4 KiB
C#
40 lines
1.4 KiB
C#
using DigitalData.UserManager.Domain.Entities;
|
|
using EnvelopeGenerator.Application.DTOs.Receiver;
|
|
using EnvelopeGenerator.Application.Envelopes.Commands;
|
|
|
|
namespace EnvelopeGenerator.Application.EnvelopeReceivers.Commands.Create;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public record CreateEnvelopeReceiverResponse : CreateEnvelopeResponse
|
|
{
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="Id"></param>
|
|
/// <param name="UserId"></param>
|
|
/// <param name="Status"></param>
|
|
/// <param name="Uuid"></param>
|
|
/// <param name="Message"></param>
|
|
/// <param name="AddedWhen"></param>
|
|
/// <param name="ChangedWhen"></param>
|
|
/// <param name="Title"></param>
|
|
/// <param name="Language"></param>
|
|
/// <param name="TFAEnabled"></param>
|
|
/// <param name="User"></param>
|
|
public CreateEnvelopeReceiverResponse(int Id, int UserId, int Status, string Uuid, string? Message, DateTime AddedWhen, DateTime? ChangedWhen, string? Title, string Language, bool TFAEnabled, User User) : base(Id, UserId, Status, Uuid, Message, AddedWhen, ChangedWhen, Title, Language, TFAEnabled, User)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public IEnumerable<ReceiverReadDto> SentRecipients { get; set; } = new List<ReceiverReadDto>();
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public IEnumerable<ReceiverGetOrCreateCommand> UnsentRecipients { get; set; } = new List<ReceiverGetOrCreateCommand>();
|
|
}
|