refactor(Envelope): Envelope-Entitätseigenschaften für NET/NETFRAMEWORK nullfähig und bedingt machen
- Mehrere DateTime- und int-Eigenschaften in nullfähige Typen geändert - Bedingte Kompilierung für Message, Title, ContractTypeTranslated und StatusTranslated angewendet - Einige Standardwerte entfernt, um die Kompatibilität mit verschiedenen Frameworks zu verbessern - Flexibilität der Entitätszuordnung für Envelope verbessert
This commit is contained in:
parent
e095074c22
commit
4201f7820a
@ -37,34 +37,46 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
|
|
||||||
// TODO: * Check the Form App and remove the default value
|
// TODO: * Check the Form App and remove the default value
|
||||||
[Column("MESSAGE", TypeName = "nvarchar(max)")]
|
[Column("MESSAGE", TypeName = "nvarchar(max)")]
|
||||||
public string Message { get; set; } = My.Resources.Envelope.Please_read_and_sign_this_document;
|
public string Message { get; set; }
|
||||||
|
#if NETFRAMEWORK
|
||||||
|
= My.Resources.Envelope.Please_read_and_sign_this_document;
|
||||||
|
#endif
|
||||||
|
|
||||||
[Column("EXPIRES_WHEN", TypeName = "datetime")]
|
[Column("EXPIRES_WHEN", TypeName = "datetime")]
|
||||||
public DateTime ExpiresWhen { get; set; }
|
public DateTime? ExpiresWhen { get; set; }
|
||||||
|
|
||||||
[Column("EXPIRES_WARNING_WHEN", TypeName = "datetime")]
|
[Column("EXPIRES_WARNING_WHEN", TypeName = "datetime")]
|
||||||
public DateTime ExpiresWarningWhen { get; set; }
|
public DateTime? ExpiresWarningWhen { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||||
public DateTime AddedWhen { get; set; }
|
public DateTime AddedWhen { get; set; }
|
||||||
|
|
||||||
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
||||||
public DateTime ChangedWhen { get; set; }
|
public DateTime? ChangedWhen { get; set; }
|
||||||
|
|
||||||
// TODO: * Check the Form App and remove the default value
|
// TODO: * Check the Form App and remove the default value
|
||||||
[Column("TITLE", TypeName = "nvarchar(128)")]
|
[Column("TITLE", TypeName = "nvarchar(128)")]
|
||||||
public string Title { get; set; } = string.Empty;
|
public string
|
||||||
|
#if NET
|
||||||
|
?
|
||||||
|
#endif
|
||||||
|
Title { get; set; }
|
||||||
|
#if NETFRAMEWORK
|
||||||
|
= string.Empty;
|
||||||
|
#endif
|
||||||
|
|
||||||
[Column("COMMENT", TypeName = "nvarchar(128)")]
|
[Column("COMMENT", TypeName = "nvarchar(128)")]
|
||||||
public string Comment { get; set; } = string.Empty;
|
public string Comment { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Column("CONTRACT_TYPE")]
|
[Column("CONTRACT_TYPE")]
|
||||||
public int ContractType { get; set; }
|
public int? ContractType { get; set; }
|
||||||
|
|
||||||
// TODO: * Check the Form App and remove the default value
|
// TODO: * Check the Form App and remove the default value
|
||||||
|
#if NETFRAMEWORK
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public string ContractTypeTranslated => My.Resources.Model.ResourceManager.GetString(ContractType.ToString());
|
public string ContractTypeTranslated => My.Resources.Model.ResourceManager.GetString(ContractType.ToString());
|
||||||
|
#endif
|
||||||
|
|
||||||
// TODO: * Check the Form App and remove the default value
|
// TODO: * Check the Form App and remove the default value
|
||||||
[Column("LANGUAGE", TypeName = "nvarchar(5)")]
|
[Column("LANGUAGE", TypeName = "nvarchar(5)")]
|
||||||
@ -76,34 +88,34 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
|
|
||||||
// TODO: * Check the Form App and remove the default value
|
// TODO: * Check the Form App and remove the default value
|
||||||
[Column("FIRST_REMINDER_DAYS")]
|
[Column("FIRST_REMINDER_DAYS")]
|
||||||
public int FirstReminderDays { get; set; } = 0;
|
public int? FirstReminderDays { get; set; } = 0;
|
||||||
|
|
||||||
// TODO: * Check the Form App and remove the default value
|
// TODO: * Check the Form App and remove the default value
|
||||||
[Column("REMINDER_INTERVAL_DAYS")]
|
[Column("REMINDER_INTERVAL_DAYS")]
|
||||||
public int ReminderIntervalDays { get; set; } = 0;
|
public int? ReminderIntervalDays { get; set; } = 0;
|
||||||
|
|
||||||
[Column("ENVELOPE_TYPE")]
|
[Column("ENVELOPE_TYPE")]
|
||||||
public int EnvelopeTypeId { get; set; }
|
public int? EnvelopeTypeId { get; set; }
|
||||||
|
|
||||||
// TODO: * Check the Form App and remove the default value
|
// TODO: * Check the Form App and remove the default value
|
||||||
[Column("CERTIFICATION_TYPE")]
|
[Column("CERTIFICATION_TYPE")]
|
||||||
public int CertificationType { get; set; } = (int)Constants.CertificationType.AdvancedElectronicSignature;
|
public int? CertificationType { get; set; } = (int)Constants.CertificationType.AdvancedElectronicSignature;
|
||||||
|
|
||||||
// TODO: * Check the Form App and remove the default value
|
// TODO: * Check the Form App and remove the default value
|
||||||
[Column("USE_ACCESS_CODE")]
|
[Column("USE_ACCESS_CODE")]
|
||||||
public bool UseAccessCode { get; set; } = false;
|
public bool UseAccessCode { get; set; } = false;
|
||||||
|
|
||||||
[Column("FINAL_EMAIL_TO_CREATOR")]
|
[Column("FINAL_EMAIL_TO_CREATOR")]
|
||||||
public int FinalEmailToCreator { get; set; }
|
public int? FinalEmailToCreator { get; set; }
|
||||||
|
|
||||||
[Column("FINAL_EMAIL_TO_RECEIVERS")]
|
[Column("FINAL_EMAIL_TO_RECEIVERS")]
|
||||||
public int FinalEmailToReceivers { get; set; }
|
public int? FinalEmailToReceivers { get; set; }
|
||||||
|
|
||||||
[Column("EXPIRES_WHEN_DAYS")]
|
[Column("EXPIRES_WHEN_DAYS")]
|
||||||
public int ExpiresWhenDays { get; set; }
|
public int? ExpiresWhenDays { get; set; }
|
||||||
|
|
||||||
[Column("EXPIRES_WARNING_WHEN_DAYS")]
|
[Column("EXPIRES_WARNING_WHEN_DAYS")]
|
||||||
public int ExpiresWarningWhenDays { get; set; }
|
public int? ExpiresWarningWhenDays { get; set; }
|
||||||
|
|
||||||
// TODO: * Check the Form App and remove the default value
|
// TODO: * Check the Form App and remove the default value
|
||||||
[Column("TFA_ENABLED", TypeName = "bit")]
|
[Column("TFA_ENABLED", TypeName = "bit")]
|
||||||
@ -128,8 +140,10 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
[NotMapped]
|
[NotMapped]
|
||||||
public bool IsAlreadySent => Status > (int)Constants.EnvelopeStatus.EnvelopeSaved;
|
public bool IsAlreadySent => Status > (int)Constants.EnvelopeStatus.EnvelopeSaved;
|
||||||
|
|
||||||
|
#if NETFRAMEWORK
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public string StatusTranslated => My.Resources.Model.ResourceManager.GetString(((Constants.EnvelopeStatus)Status).ToString());
|
public string StatusTranslated => My.Resources.Model.ResourceManager.GetString(((Constants.EnvelopeStatus)Status).ToString());
|
||||||
|
#endif
|
||||||
|
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public bool TFA_Enabled { get; set; } = false;
|
public bool TFA_Enabled { get; set; } = false;
|
||||||
|
|||||||
@ -42,7 +42,9 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
|
|
||||||
public virtual Receiver Receiver { get; set; }
|
public virtual Receiver Receiver { get; set; }
|
||||||
|
|
||||||
|
#if NETFRAMEWORK
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public string StatusTranslated => My.Resources.Model.ResourceManager.GetString(Status.ToString());
|
public string StatusTranslated => My.Resources.Model.ResourceManager.GetString(Status.ToString());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user