diff --git a/EnvelopeGenerator.Application/Common/Dto/EnvelopeDto.cs b/EnvelopeGenerator.Application/Common/Dto/EnvelopeDto.cs
index a1fd893b..08068066 100644
--- a/EnvelopeGenerator.Application/Common/Dto/EnvelopeDto.cs
+++ b/EnvelopeGenerator.Application/Common/Dto/EnvelopeDto.cs
@@ -62,7 +62,7 @@ public record EnvelopeDto : IEnvelope
///
///
///
- public int? ContractType { get; set; }
+ public ContractType? ContractType { get; set; }
///
/// Default value is 'de-DE'
diff --git a/EnvelopeGenerator.Application/Envelopes/Commands/CreateEnvelopeCommandHandler.cs b/EnvelopeGenerator.Application/Envelopes/Commands/CreateEnvelopeCommandHandler.cs
index 5097fda5..33134c80 100644
--- a/EnvelopeGenerator.Application/Envelopes/Commands/CreateEnvelopeCommandHandler.cs
+++ b/EnvelopeGenerator.Application/Envelopes/Commands/CreateEnvelopeCommandHandler.cs
@@ -302,7 +302,7 @@ public class CreateEnvelopeCommandHandler : IRequestHandler 0 ? DateTime.Now.AddDays(expiresWarningWhenDays) : null,
ContractType: existing?.ContractType
?? selectedType?.ContractType
- ?? (int)ContractType.Contract);
+ ?? ContractType.Contract);
}
private static string ResolveLanguage(string? preferred, string? fallback1, string? fallback2)
@@ -333,7 +333,7 @@ public class CreateEnvelopeCommandHandler : IRequestHandler ResolveSenderReferenceAsync(Envelope envelope, CancellationToken cancel)
{
diff --git a/EnvelopeGenerator.Domain/Entities/Envelope.cs b/EnvelopeGenerator.Domain/Entities/Envelope.cs
index dbeb2616..1e2f7980 100644
--- a/EnvelopeGenerator.Domain/Entities/Envelope.cs
+++ b/EnvelopeGenerator.Domain/Entities/Envelope.cs
@@ -83,7 +83,7 @@ namespace EnvelopeGenerator.Domain.Entities
public string Comment { get; set; }
[Column("CONTRACT_TYPE")]
- public int? ContractType { get; set; }
+ public ContractType? ContractType { get; set; }
#if NETFRAMEWORK
[NotMapped]