feat(ReadDocumentMappingProfile): Added mapping profile of ReadDocumentResponse
This commit is contained in:
parent
8785505a91
commit
97dcc0f0a1
@ -0,0 +1,18 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Documents.Queries.Read;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public class ReadDocumentMappingProfile : Profile
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public ReadDocumentMappingProfile()
|
||||||
|
{
|
||||||
|
CreateMap<EnvelopeDocument, ReadDocumentResponse>();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -3,13 +3,25 @@
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents the response for reading a document.
|
/// Represents the response for reading a document.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="Guid">The unique identifier of the document.</param>
|
public class ReadDocumentResponse
|
||||||
/// <param name="EnvelopeId">The identifier of the associated envelope.</param>
|
{
|
||||||
/// <param name="AddedWhen">The date and time when the document was added.</param>
|
/// <summary>
|
||||||
/// <param name="ByteData">The binary data of the document, if available.</param>
|
/// The unique identifier of the document.
|
||||||
public record ReadDocumentResponse(
|
/// </summary>
|
||||||
int Guid,
|
public int Guid { get; init; }
|
||||||
int EnvelopeId,
|
|
||||||
DateTime AddedWhen,
|
/// <summary>
|
||||||
byte[]? ByteData
|
/// The identifier of the associated envelope.
|
||||||
);
|
/// </summary>
|
||||||
|
public int EnvelopeId { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The date and time when the document was added.
|
||||||
|
/// </summary>
|
||||||
|
public DateTime AddedWhen { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The binary data of the document, if available.
|
||||||
|
/// </summary>
|
||||||
|
public byte[]? ByteData { get; init; }
|
||||||
|
}
|
||||||
|
|||||||
@ -42,8 +42,7 @@ public static class DIExtensions
|
|||||||
services.TryAddScoped<IEnvelopeReceiverReadOnlyService, EnvelopeReceiverReadOnlyService>();
|
services.TryAddScoped<IEnvelopeReceiverReadOnlyService, EnvelopeReceiverReadOnlyService>();
|
||||||
|
|
||||||
//Auto mapping profiles
|
//Auto mapping profiles
|
||||||
services.AddAutoMapper(typeof(BasicDtoMappingProfile).Assembly);
|
services.AddAutoMapper(Assembly.GetExecutingAssembly());
|
||||||
services.AddAutoMapper(typeof(UserMappingProfile).Assembly);
|
|
||||||
|
|
||||||
services.Configure<DispatcherParams>(config.GetSection(nameof(DispatcherParams)));
|
services.Configure<DispatcherParams>(config.GetSection(nameof(DispatcherParams)));
|
||||||
services.Configure<MailParams>(config.GetSection(nameof(MailParams)));
|
services.Configure<MailParams>(config.GetSection(nameof(MailParams)));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user