Refactor: Use FinalEmailType enum for email settings
Replaced raw `int` values with the strongly-typed `FinalEmailType` enum for `FinalEmailToCreator` and `FinalEmailToReceivers` across the codebase. Updated DTOs, entities, commands, handlers, Razor components, and test controllers to reflect this change. This improves type safety, code readability, and maintainability. Default values now use `FinalEmailType.No` instead of integer casting. Adjusted database mappings and added necessary imports to support the new enum type.
This commit is contained in:
@@ -79,12 +79,12 @@ public record EnvelopeDto : IEnvelope
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int? FinalEmailToCreator { get; set; }
|
||||
public FinalEmailType? FinalEmailToCreator { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int? FinalEmailToReceivers { get; set; }
|
||||
public FinalEmailType? FinalEmailToReceivers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
|
||||
@@ -35,12 +35,12 @@ public class EnvelopeTypeDefaultsDto
|
||||
/// <summary>
|
||||
/// Gets or sets the final email template ID to be sent to the creator.
|
||||
/// </summary>
|
||||
public int? FinalEmailToCreator { get; set; }
|
||||
public FinalEmailType? FinalEmailToCreator { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the final email template ID to be sent to the receivers.
|
||||
/// </summary>
|
||||
public int? FinalEmailToReceivers { get; set; }
|
||||
public FinalEmailType? FinalEmailToReceivers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the timestamp when this envelope type was added.
|
||||
|
||||
Reference in New Issue
Block a user