Refactor: Replace EnvelopeTypeId with EnvelopeType enum
Replaced all instances of `EnvelopeTypeId` (int/int?) with `Type` (EnvelopeType/EnvelopeType?) across the codebase to improve type safety and readability. Updated affected properties, methods, and logic in DTOs, commands, handlers, and Razor components. Introduced conditional compilation to handle differences between .NET and .NET Framework where necessary. Removed obsolete helper methods for `EnvelopeTypeId`. This refactor ensures consistent use of the strongly-typed `EnvelopeType` enum, reducing the risk of invalid values and aligning with best practices.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
|
||||
namespace EnvelopeGenerator.Server.Client.Models;
|
||||
|
||||
/// <summary>
|
||||
@@ -38,7 +40,7 @@ public record EnvelopeClientDto
|
||||
public DateTime AddedWhen { get; init; }
|
||||
public DateTime? ChangedWhen { get; init; }
|
||||
public string Language { get; init; } = "de-DE";
|
||||
public int? EnvelopeTypeId { get; init; }
|
||||
public EnvelopeType? Type { get; init; }
|
||||
public string? EnvelopeTypeTitle { get; init; }
|
||||
public bool UseAccessCode { get; init; }
|
||||
public bool TFAEnabled { get; init; }
|
||||
|
||||
Reference in New Issue
Block a user