diff --git a/EnvelopeGenerator.Domain/Entities/DocumentStatus.cs b/EnvelopeGenerator.Domain/Entities/DocumentStatus.cs index 3444475f..dd2feee1 100644 --- a/EnvelopeGenerator.Domain/Entities/DocumentStatus.cs +++ b/EnvelopeGenerator.Domain/Entities/DocumentStatus.cs @@ -1,5 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; +using EnvelopeGenerator.Domain.Interfaces; + #if NETFRAMEWORK using System; #endif @@ -12,7 +14,7 @@ namespace EnvelopeGenerator.Domain.Entities #endif [Table("TBSIG_DOCUMENT_STATUS", Schema = "dbo")] -public class DocumentStatus +public class DocumentStatus : IHasEnvelope, IHasReceiver { public DocumentStatus() { @@ -43,10 +45,18 @@ public class DocumentStatus public string Value { get; set; } [ForeignKey("EnvelopeId")] - public virtual Envelope Envelope { get; set; } + public virtual Envelope +#if NET + ? +#endif + Envelope { get; set; } [ForeignKey("ReceiverId")] - public virtual Receiver Receiver { get; set; } + public virtual Receiver +#if NET + ? +#endif + Receiver { get; set; } } #if NETFRAMEWORK diff --git a/EnvelopeGenerator.Domain/Entities/EnvelopeReceiver.cs b/EnvelopeGenerator.Domain/Entities/EnvelopeReceiver.cs index 93cccaaa..cf3862f3 100644 --- a/EnvelopeGenerator.Domain/Entities/EnvelopeReceiver.cs +++ b/EnvelopeGenerator.Domain/Entities/EnvelopeReceiver.cs @@ -1,6 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using System.Drawing; +using EnvelopeGenerator.Domain.Interfaces; + #if NETFRAMEWORK using System; #endif @@ -13,7 +14,7 @@ namespace EnvelopeGenerator.Domain.Entities #endif [Table("TBSIG_ENVELOPE_RECEIVER", Schema = "dbo")] -public class EnvelopeReceiver +public class EnvelopeReceiver : IHasEnvelope, IHasReceiver { public EnvelopeReceiver() { @@ -70,10 +71,18 @@ public class EnvelopeReceiver public bool HasPhoneNumber => !string.IsNullOrWhiteSpace(PhoneNumber); [ForeignKey("EnvelopeId")] - public Envelope Envelope { get; set; } + public Envelope +#if NET + ? +#endif + Envelope { get; set; } [ForeignKey("ReceiverId")] - public Receiver Receiver { get; set; } + public Receiver +#if NET + ? +#endif + Receiver { get; set; } #region Model of old serice [NotMapped] @@ -86,8 +95,8 @@ public class EnvelopeReceiver public bool HasEmailAndName => !string.IsNullOrWhiteSpace(Receiver.EmailAddress) && !string.IsNullOrWhiteSpace(Name); - #endregion -} + #endregion + } #if NETFRAMEWORK } diff --git a/EnvelopeGenerator.Domain/Interfaces/IHasEnvelope.cs b/EnvelopeGenerator.Domain/Interfaces/IHasEnvelope.cs new file mode 100644 index 00000000..bfc38712 --- /dev/null +++ b/EnvelopeGenerator.Domain/Interfaces/IHasEnvelope.cs @@ -0,0 +1,22 @@ +namespace EnvelopeGenerator.Domain.Interfaces +#if NET + ; +#elif NETFRAMEWORK + { +#endif + +interface IHasEnvelope +{ +#if NET + public +#endif + Entities.Envelope +#if NET + ? +#endif + Envelope { get; set; } +} + +#if NETFRAMEWORK +} +#endif \ No newline at end of file diff --git a/EnvelopeGenerator.Domain/Interfaces/IHasReceiver.cs b/EnvelopeGenerator.Domain/Interfaces/IHasReceiver.cs new file mode 100644 index 00000000..d14c9ca6 --- /dev/null +++ b/EnvelopeGenerator.Domain/Interfaces/IHasReceiver.cs @@ -0,0 +1,22 @@ +namespace EnvelopeGenerator.Domain.Interfaces +#if NET + ; +#elif NETFRAMEWORK + { +#endif + +interface IHasReceiver + { +#if NET + public +#endif + Entities.Receiver +#if NET + ? +#endif + Receiver { get; set; } +} + +#if NETFRAMEWORK +} +#endif \ No newline at end of file