Refactor CertificationType to use enum

Changed CertificationType from int? to CertificationType? enum across multiple files, including EnvelopeDto, EnvelopeTypeDto, and CreateEnvelopeCommand, to improve type safety. Removed the NormalizeCertificationType method as it is no longer necessary. Updated components and records to use the enum directly, enhancing code clarity and reducing potential errors. Added necessary using directives for the enum.
This commit is contained in:
2026-10-26 16:59:49 +01:00
parent ae1ecbc15f
commit c2b7579717
10 changed files with 26 additions and 43 deletions

View File

@@ -30,7 +30,7 @@ namespace EnvelopeGenerator.Domain.Entities
SendReminderEmails = false;
FirstReminderDays = 0;
ReminderIntervalDays = 0;
CertificationType = (int)Constants.CertificationType.AdvancedElectronicSignature;
CertificationType = Constants.CertificationType.AdvancedElectronicSignature;
UseAccessCode = false;
Documents = Enumerable.Empty<Document>().ToList();
Histories = Enumerable.Empty<History>().ToList();
@@ -111,7 +111,7 @@ namespace EnvelopeGenerator.Domain.Entities
public bool ReadOnly => this.IsReadAndConfirm();
[Column("CERTIFICATION_TYPE")]
public int? CertificationType { get; set; }
public CertificationType? CertificationType { get; set; }
[Column("USE_ACCESS_CODE")]
public bool? UseAccessCode { get; set; }