refactor(ReadHistoryQuery): update to use dto and remove response class
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using DigitalData.UserManager.Application.DTOs.User;
|
||||
using EnvelopeGenerator.Application.Dto.Receiver;
|
||||
using EnvelopeGenerator.Domain;
|
||||
using static EnvelopeGenerator.Domain.Constants;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Dto.EnvelopeHistory;
|
||||
@@ -29,6 +30,16 @@ public record EnvelopeHistoryDto
|
||||
/// </summary>
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Type of reference for this history entry.
|
||||
/// </summary>
|
||||
public Constants.ReferenceType ReferenceType => Status.ToString().FirstOrDefault() switch
|
||||
{
|
||||
'1' => Constants.ReferenceType.Sender,
|
||||
'2' => Constants.ReferenceType.Receiver,
|
||||
_ => Constants.ReferenceType.System,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Human-readable name of the status.
|
||||
/// </summary>
|
||||
@@ -54,11 +65,6 @@ public record EnvelopeHistoryDto
|
||||
/// </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>
|
||||
|
||||
Reference in New Issue
Block a user