Refactor envelope receiver command and response handling

- 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`.
This commit is contained in:
Developer 02
2025-05-06 12:32:54 +02:00
parent 8c2550ff1d
commit eaa1232490
6 changed files with 70 additions and 10 deletions

View File

@@ -1,4 +1,5 @@
using AutoMapper;
using EnvelopeGenerator.Application.EnvelopeReceivers.Commands.Create;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Envelopes.Commands;
@@ -13,6 +14,6 @@ public class CreateEnvelopeMappingProfile : Profile
/// </summary>
public CreateEnvelopeMappingProfile()
{
CreateMap<Envelope, CreateEnvelopeResponse>();
CreateMap<Envelope, CreateEnvelopeReceiverResponse>();
}
}