using EnvelopeGenerator.Domain; namespace EnvelopeGenerator.Application.Histories.Queries.Read; /// /// Represents the history of an envelope, including its status, user actions, and references. /// public class ReadHistoryResponse { /// /// Gets or sets the unique identifier of the envelope history record. /// public long Id { get; set; } /// /// Gets or sets the identifier of the associated envelope. /// public int EnvelopeId { get; set; } /// /// Gets or sets the reference identifier of the user who performed the action. /// public required string UserReference { get; set; } /// /// Gets or sets the status code of the envelope. /// public int Status { get; set; } /// /// /// public Constants.ReferenceType ReferenceType => Status.ToString().FirstOrDefault() switch { '1' => Constants.ReferenceType.Sender, '2' => Constants.ReferenceType.Receiver, _ => Constants.ReferenceType.System, }; /// /// Gets or sets the date and time when the record was added. /// public DateTime AddedWhen { get; set; } /// /// Gets or sets the date and time when the action occurred. /// public DateTime? ActionDate { get; set; } /// /// Gets or sets the optional comment about the envelope history record. /// public string? Comment { get; set; } /// public override int GetHashCode() { return Id.GetHashCode(); } }