refactor(Domain.Entities.EnvelopeType): Aktualisiert, um Common.Entities.EnvelopeType zu enthalten.
- Geändert CertificationType, FinalEmailToCreator und FinalEmailToReceivers verwenden nun Enum-Typen von Constants - Standardwerte für einige Eigenschaften hinzugefügt, um eine sicherere Initialisierung zu gewährleisten - Einführung von NotMapped-Eigenschaften (TFA_Enabled, ExpiresWhen, ExpiresWarningWhen, ExpiresWhenDays, ExpiresWarningWhenDays) für zusätzliche Geschäftslogik ohne Datenbank-Mapping - ToString() überschrieben, um den Titel zur einfacheren Fehlersuche und Anzeige zurückzugeben
This commit is contained in:
parent
a38c2cd956
commit
b83607d916
@ -12,7 +12,7 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[Column("GUID")]
|
||||
public int Id { get; set; }
|
||||
public int Id { get; set; } = 0;
|
||||
|
||||
[Required]
|
||||
[Column("TITLE", TypeName = "nvarchar(128)")]
|
||||
@ -25,16 +25,16 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
public int ExpiresDays { get; set; }
|
||||
|
||||
[Column("CERTIFICATION_TYPE")]
|
||||
public int CertificationType { get; set; }
|
||||
public Constants.CertificationType CertificationType { get; set; } = Constants.CertificationType.AdvancedElectronicSignature;
|
||||
|
||||
[Column("USE_ACCESS_CODE")]
|
||||
public bool UseAccessCode { get; set; }
|
||||
|
||||
[Column("FINAL_EMAIL_TO_CREATOR")]
|
||||
public int FinalEmailToCreator { get; set; }
|
||||
public Constants.FinalEmailType FinalEmailToCreator { get; set; }
|
||||
|
||||
[Column("FINAL_EMAIL_TO_RECEIVERS")]
|
||||
public int FinalEmailToReceivers { get; set; }
|
||||
public Constants.FinalEmailType FinalEmailToReceivers { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||
@ -47,15 +47,43 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
public int ExpiresWarningDays { get; set; }
|
||||
|
||||
[Column("SEND_REMINDER_EMAILS")]
|
||||
public bool SendReminderEmails { get; set; }
|
||||
public bool SendReminderEmails { get; set; } = false;
|
||||
|
||||
[Column("FIRST_REMINDER_DAYS")]
|
||||
public int FirstReminderDays { get; set; }
|
||||
public int FirstReminderDays { get; set; } = 0;
|
||||
|
||||
[Column("REMINDER_INTERVAL_DAYS")]
|
||||
public int ReminderIntervalDays { get; set; }
|
||||
public int ReminderIntervalDays { get; set; } = 0;
|
||||
|
||||
[Column("CONTRACT_TYPE")]
|
||||
public int ContractType { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public bool TFA_Enabled { get; set; } = false;
|
||||
|
||||
[NotMapped]
|
||||
public DateTime ExpiresWhen { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public DateTime ExpiresWarningWhen { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public int ExpiresWhenDays
|
||||
{
|
||||
get => ExpiresDays;
|
||||
set => ExpiresDays = value;
|
||||
}
|
||||
|
||||
[NotMapped]
|
||||
public int ExpiresWarningWhenDays
|
||||
{
|
||||
get => ExpiresWarningDays;
|
||||
set => ExpiresWarningDays = value;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return Title;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user