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,8 @@
using DigitalData.UserManager.Domain.Entities;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using EnvelopeGenerator.Domain.Constants;
#if NETFRAMEWORK
using System;
using System.Collections.Generic;
@@ -22,7 +24,7 @@ public class Envelope
// TODO: * Check the Form App and remove the default value
#if NETFRAMEWORK
Id = 0;
Status = Constants.EnvelopeStatus.EnvelopeCreated;
Status = EnvelopeStatus.EnvelopeCreated;
Uuid = Guid.NewGuid().ToString();
Message = My.Resources.Envelope.Please_read_and_sign_this_document;
Title= string.Empty;
@@ -50,7 +52,7 @@ public class Envelope
[Required]
[Column("STATUS")]
public Constants.EnvelopeStatus Status { get; set; }
public EnvelopeStatus Status { get; set; }
[Required]
[Column("ENVELOPE_UUID", TypeName = "nvarchar(36)")]
@@ -153,7 +155,7 @@ public class Envelope
public string CURRENT_WORK_APP { get; set; } = "signFLOW GUI";
[NotMapped]
public bool IsAlreadySent => Status > Constants.EnvelopeStatus.EnvelopeSaved;
public bool IsAlreadySent => Status > EnvelopeStatus.EnvelopeSaved;
#endif
public List<EnvelopeDocument> Documents { get; set; }

View File

@@ -32,7 +32,7 @@ public class EnvelopeHistory : IHasEnvelope, IHasReceiver
[Required]
[Column("STATUS")]
public Constants.EnvelopeStatus Status { get; set; }
public EnvelopeStatus Status { get; set; }
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]