Refactor: Rename SignatureDto to DocReceiverElementDto
Renamed `SignatureDto` to `DocReceiverElementDto` across the codebase to better reflect its purpose as a DTO for document receiver elements. Updated all references, including: - `SignatureController.cs`: Changed `doc.Elements` type to `IEnumerable<DocReceiverElementDto>`. - `DocumentDto.cs`: Updated `Elements` property type. - `MappingProfile.cs`: Adjusted mappings for the renamed DTO. - `IDocumentReceiverElementService.cs` and `DocumentReceiverElementService.cs`: Updated interfaces and services to use the new DTO. - `TestDocumentReceiverElementController.cs`: Updated generic type parameters. These changes improve clarity, align naming with the domain model, and ensure consistency throughout the application.
This commit is contained in:
@@ -44,7 +44,7 @@ public class SignatureController : ControllerBase
|
||||
|
||||
var doc = await _mediator.Send(new ReadDocumentQuery() { EnvelopeId = envelopeId }, cancel);
|
||||
|
||||
if (doc.Elements is not IEnumerable<SignatureDto> docSignatures)
|
||||
if (doc.Elements is not IEnumerable<DocReceiverElementDto> docSignatures)
|
||||
return NotFound("Document is empty.");
|
||||
|
||||
var rcvSignatures = docSignatures.Where(s => s.ReceiverId == receiverId).ToList();
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace EnvelopeGenerator.Application.Common.Dto;
|
||||
/// Data Transfer Object representing a positioned element assigned to a document receiver.
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public class SignatureDto : IDocReceiverElement
|
||||
public class DocReceiverElementDto : IDocReceiverElement
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the unique identifier of the element.
|
||||
@@ -31,5 +31,5 @@ public class DocumentDto
|
||||
/// <summary>
|
||||
/// Gets or sets the collection of elements associated with the document for receiver interactions, if any.
|
||||
/// </summary>
|
||||
public IEnumerable<SignatureDto>? Elements { get; set; }
|
||||
public IEnumerable<DocReceiverElementDto>? Elements { get; set; }
|
||||
}
|
||||
@@ -23,7 +23,7 @@ public class MappingProfile : Profile
|
||||
{
|
||||
// Entity to DTO mappings
|
||||
CreateMap<Config, ConfigDto>();
|
||||
CreateMap<DocReceiverElement, SignatureDto>();
|
||||
CreateMap<DocReceiverElement, DocReceiverElementDto>();
|
||||
CreateMap<DocumentStatus, DocumentStatusDto>();
|
||||
CreateMap<EmailTemplate, EmailTemplateDto>();
|
||||
CreateMap<Envelope, EnvelopeDto>();
|
||||
@@ -39,7 +39,7 @@ public class MappingProfile : Profile
|
||||
|
||||
// DTO to Entity mappings
|
||||
CreateMap<ConfigDto, Config>();
|
||||
CreateMap<SignatureDto, DocReceiverElement>();
|
||||
CreateMap<DocReceiverElementDto, DocReceiverElement>();
|
||||
CreateMap<DocumentStatusDto, DocumentStatus>();
|
||||
CreateMap<EmailTemplateDto, EmailTemplate>();
|
||||
CreateMap<EnvelopeDto, Envelope>();
|
||||
|
||||
@@ -8,6 +8,6 @@ namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
///
|
||||
/// </summary>
|
||||
[Obsolete("Use MediatR")]
|
||||
public interface IDocumentReceiverElementService : IBasicCRUDService<SignatureDto, DocReceiverElement, int>
|
||||
public interface IDocumentReceiverElementService : IBasicCRUDService<DocReceiverElementDto, DocReceiverElement, int>
|
||||
{
|
||||
}
|
||||
@@ -11,7 +11,7 @@ namespace EnvelopeGenerator.Application.Services;
|
||||
///
|
||||
/// </summary>
|
||||
[Obsolete("Use MediatR")]
|
||||
public class DocumentReceiverElementService : BasicCRUDService<IDocumentReceiverElementRepository, SignatureDto, DocReceiverElement, int>, IDocumentReceiverElementService
|
||||
public class DocumentReceiverElementService : BasicCRUDService<IDocumentReceiverElementRepository, DocReceiverElementDto, DocReceiverElement, int>, IDocumentReceiverElementService
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
|
||||
@@ -5,7 +5,7 @@ using EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
namespace EnvelopeGenerator.Web.Controllers.Test;
|
||||
|
||||
[Obsolete("Use MediatR")]
|
||||
public class TestDocumentReceiverElementController : TestControllerBase<IDocumentReceiverElementService, SignatureDto, DocReceiverElement, int>
|
||||
public class TestDocumentReceiverElementController : TestControllerBase<IDocumentReceiverElementService, DocReceiverElementDto, DocReceiverElement, int>
|
||||
{
|
||||
public TestDocumentReceiverElementController(ILogger<TestDocumentReceiverElementController> logger, IDocumentReceiverElementService service) : base(logger, service)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user