add and implement IHasEnvelope and IHasReceiver
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user