Developer 02 eaa1232490 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`.
2025-05-06 12:32:54 +02:00

25 lines
735 B
C#

using DigitalData.Core.Abstractions;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
using Microsoft.AspNetCore.Mvc;
using System.Text.Json.Serialization;
namespace EnvelopeGenerator.Application.DTOs.Receiver;
[ApiExplorerSettings(IgnoreApi = true)]
public record ReceiverReadDto(
int Id,
string EmailAddress,
string Signature,
DateTime AddedWhen
) : BaseDTO<int>(Id), IUnique<int>
{
[JsonIgnore]
public IEnumerable<EnvelopeReceiverBasicDto>? EnvelopeReceivers { get; init; }
public string? LastUsedName => EnvelopeReceivers?.LastOrDefault()?.Name;
public string? TotpSecretkey { get; set; } = null;
public DateTime? TfaRegDeadline { get; set; }
};