2025-08-22 15:24:34 +02:00

69 lines
2.0 KiB
C#

using DigitalData.UserManager.Application.DTOs.User;
using EnvelopeGenerator.Application.Dto.Receiver;
using static EnvelopeGenerator.Domain.Constants;
namespace EnvelopeGenerator.Application.Dto.EnvelopeHistory;
/// <summary>
/// Data Transfer Object representing the history of an envelope, including status, sender, receiver, and related metadata.
/// </summary>
public record EnvelopeHistoryDto
{
/// <summary>
/// Unique identifier for the envelope history entry.
/// </summary>
public long Id { get; set; }
/// <summary>
/// Identifier of the associated envelope.
/// </summary>
public int EnvelopeId { get; set; }
/// <summary>
/// Reference string for the user related to this history entry.
/// </summary>
public required string UserReference { get; set; }
/// <summary>
/// StatusQ code of the envelope at this history point.
/// </summary>
public int Status { get; set; }
/// <summary>
/// Human-readable name of the status.
/// </summary>
public string? StatusName { get; set; }
/// <summary>
/// Date and time when this history entry was added.
/// </summary>
public DateTime AddedWhen { get; set; }
/// <summary>
/// Date and time when an action was performed, if applicable.
/// </summary>
public DateTime? ActionDate { get; set; }
/// <summary>
/// Information about the sender associated with this history entry.
/// </summary>
public UserCreateDto? Sender { get; set; }
/// <summary>
/// Information about the receiver associated with this history entry.
/// </summary>
public ReceiverReadDto? Receiver { get; set; }
/// <summary>
/// Type of reference for this history entry.
/// </summary>
public ReferenceType ReferenceType { get; set; }
/// <summary>
/// Optional comment related to this history entry.
/// </summary>
public string? Comment { get; set; }
/// <inheritdoc/>
public override int GetHashCode() => Id.GetHashCode();
};