Refactor enum usage in codebase

Updated references from `Constants` to direct usage of `EnvelopeStatus` and `EmailTemplateType` enums. This change enhances code readability and reduces dependency on the `Constants` class.

Modified properties and parameters across command classes, DTOs, repositories, and services to use the enums directly. Updated `ModifyDocStatusCommandBase`, `EnvelopeHistoryDto`, and `ResetEmailTemplateCommand` for improved clarity.

Consistent updates across multiple files indicate a systematic refactoring aimed at streamlining the codebase and improving maintainability. Comments and documentation have also been revised to reflect these changes.
This commit is contained in:
2025-09-01 11:04:40 +02:00
parent fc4187bb9e
commit c5c040fb15
38 changed files with 245 additions and 218 deletions

View File

@@ -1,6 +1,6 @@
using DigitalData.UserManager.Application.DTOs.User;
using EnvelopeGenerator.Application.Dto.Receiver;
using EnvelopeGenerator.Domain;
using EnvelopeGenerator.Domain.Constants;
namespace EnvelopeGenerator.Application.Dto.EnvelopeHistory;
@@ -27,16 +27,16 @@ public record EnvelopeHistoryDto
/// <summary>
/// Include code of the envelope at this history point.
/// </summary>
public Constants.EnvelopeStatus Status { get; set; }
public EnvelopeStatus Status { get; set; }
/// <summary>
/// Type of reference for this history entry.
/// </summary>
public Constants.ReferenceType ReferenceType => ((int)Status).ToString().FirstOrDefault() switch
public ReferenceType ReferenceType => ((int)Status).ToString().FirstOrDefault() switch
{
'1' => Constants.ReferenceType.Sender,
'2' => Constants.ReferenceType.Receiver,
_ => Constants.ReferenceType.System,
'1' => ReferenceType.Sender,
'2' => ReferenceType.Receiver,
_ => ReferenceType.System,
};
/// <summary>