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:
2026-06-09 23:00:11 +02:00
parent 9b606a0d3b
commit 1089304bf1
7 changed files with 8 additions and 8 deletions

View File

@@ -0,0 +1,128 @@
using EnvelopeGenerator.Domain.Constants;
using EnvelopeGenerator.Domain.Interfaces;
using Microsoft.AspNetCore.Mvc;
using System.ComponentModel.DataAnnotations.Schema;
namespace EnvelopeGenerator.Application.Common.Dto;
/// <summary>
/// Data Transfer Object representing a positioned element assigned to a document receiver.
/// </summary>
[ApiExplorerSettings(IgnoreApi = true)]
public class DocReceiverElementDto : IDocReceiverElement
{
/// <summary>
/// Gets or sets the unique identifier of the element.
/// </summary>
public int Id { get; set; }
/// <summary>
/// Gets or sets the identifier of the associated document.
/// </summary>
public int DocumentId { get; set; }
/// <summary>
/// Gets or sets the identifier of the receiver.
/// </summary>
public int ReceiverId { get; set; }
/// <summary>
/// Gets or sets the type of the element.
/// </summary>
public int ElementType { get; set; }
/// <summary>
/// Gets or sets the X coordinate of the element.
/// </summary>
public double X { get; set; }
/// <summary>
/// Gets or sets the Y coordinate of the element.
/// </summary>
public double Y { get; set; }
/// <summary>
/// Gets or sets the width of the element.
/// </summary>
public double Width { get; set; }
/// <summary>
/// Gets or sets the height of the element.
/// </summary>
public double Height { get; set; }
/// <summary>
/// Gets or sets the page number where the element appears.
/// </summary>
public int Page { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the element is required.
/// </summary>
public bool Required { get; set; }
/// <summary>
/// Gets or sets the tooltip text for the element.
/// </summary>
public string? Tooltip { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the element is read-only.
/// </summary>
public bool ReadOnly { get; set; }
/// <summary>
/// Gets or sets the annotation index for ordering or reference.
/// </summary>
public int AnnotationIndex { get; set; }
/// <summary>
/// Gets or sets the timestamp when the element was added.
/// </summary>
public DateTime AddedWhen { get; set; }
/// <summary>
/// Gets or sets the timestamp when the element was last changed, if applicable.
/// </summary>
public DateTime? ChangedWhen { get; set; }
/// <summary>
/// Gets or sets the top position of the element (in layout terms).
/// </summary>
public double Top => Y;
/// <summary>
/// Gets or sets the left position of the element (in layout terms).
/// </summary>
public double Left => X;
/// <summary>
///
/// </summary>
public IEnumerable<AnnotationDto>? Annotations { get; set; }
/// <summary>
///
/// </summary>
public SenderAppType SenderAppType { get; set; } = SenderAppType.LegacyFormApp;
/// <summary>
///
/// </summary>
public string? FullName { get; set; }
/// <summary>
///
/// </summary>
public string? Position { get; set; }
/// <summary>
///
/// </summary>
public string? Place { get; set; }
/// <summary>
///
/// </summary>
public byte[]? Ink { get; set; }
}