Refactor DTOs for improved structure and documentation

Transitioned from records to classes for flexibility, added XML documentation for clarity, and updated property definitions to use standard getters and setters. Introduced the `required` keyword for essential properties, removed unnecessary constructors, and enhanced property descriptions for better readability. Additionally, overridden `GetHashCode` in `ReceiverReadDto` for proper collection behavior.
This commit is contained in:
Developer 02
2025-05-13 11:05:43 +02:00
parent cc11d70a27
commit 7e66cd4dae
12 changed files with 473 additions and 145 deletions

View File

@@ -1,12 +1,34 @@
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.Application.DTOs.EnvelopeHistory
namespace EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
/// <summary>
/// Data Transfer Object for creating a new envelope history record.
/// </summary>
public class EnvelopeHistoryCreateDto
{
[ApiExplorerSettings(IgnoreApi = true)]
public record EnvelopeHistoryCreateDto(
int EnvelopeId,
string UserReference,
int Status,
DateTime? ActionDate,
string? Comment = null);
/// <summary>
/// Gets or sets the identifier of the envelope.
/// </summary>
public int EnvelopeId { get; set; }
/// <summary>
/// Gets or sets the user reference associated with the action.
/// </summary>
public required string UserReference { get; set; }
/// <summary>
/// Gets or sets the status of the envelope at the time of the action.
/// </summary>
public int Status { get; set; }
/// <summary>
/// Gets or sets the date and time when the action occurred.
/// </summary>
public DateTime? ActionDate { get; set; }
/// <summary>
/// Gets or sets an optional comment related to the action.
/// </summary>
public string? Comment { get; set; }
}