add and implement IHasEnvelope and IHasReceiver
This commit is contained in:
parent
8b53eae6da
commit
dee6608390
@ -1,5 +1,7 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using EnvelopeGenerator.Domain.Interfaces;
|
||||||
|
|
||||||
#if NETFRAMEWORK
|
#if NETFRAMEWORK
|
||||||
using System;
|
using System;
|
||||||
#endif
|
#endif
|
||||||
@ -12,7 +14,7 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
[Table("TBSIG_DOCUMENT_STATUS", Schema = "dbo")]
|
[Table("TBSIG_DOCUMENT_STATUS", Schema = "dbo")]
|
||||||
public class DocumentStatus
|
public class DocumentStatus : IHasEnvelope, IHasReceiver
|
||||||
{
|
{
|
||||||
public DocumentStatus()
|
public DocumentStatus()
|
||||||
{
|
{
|
||||||
@ -43,10 +45,18 @@ public class DocumentStatus
|
|||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
|
|
||||||
[ForeignKey("EnvelopeId")]
|
[ForeignKey("EnvelopeId")]
|
||||||
public virtual Envelope Envelope { get; set; }
|
public virtual Envelope
|
||||||
|
#if NET
|
||||||
|
?
|
||||||
|
#endif
|
||||||
|
Envelope { get; set; }
|
||||||
|
|
||||||
[ForeignKey("ReceiverId")]
|
[ForeignKey("ReceiverId")]
|
||||||
public virtual Receiver Receiver { get; set; }
|
public virtual Receiver
|
||||||
|
#if NET
|
||||||
|
?
|
||||||
|
#endif
|
||||||
|
Receiver { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
#if NETFRAMEWORK
|
#if NETFRAMEWORK
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.Drawing;
|
using EnvelopeGenerator.Domain.Interfaces;
|
||||||
|
|
||||||
#if NETFRAMEWORK
|
#if NETFRAMEWORK
|
||||||
using System;
|
using System;
|
||||||
#endif
|
#endif
|
||||||
@ -13,7 +14,7 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
[Table("TBSIG_ENVELOPE_RECEIVER", Schema = "dbo")]
|
[Table("TBSIG_ENVELOPE_RECEIVER", Schema = "dbo")]
|
||||||
public class EnvelopeReceiver
|
public class EnvelopeReceiver : IHasEnvelope, IHasReceiver
|
||||||
{
|
{
|
||||||
public EnvelopeReceiver()
|
public EnvelopeReceiver()
|
||||||
{
|
{
|
||||||
@ -70,10 +71,18 @@ public class EnvelopeReceiver
|
|||||||
public bool HasPhoneNumber => !string.IsNullOrWhiteSpace(PhoneNumber);
|
public bool HasPhoneNumber => !string.IsNullOrWhiteSpace(PhoneNumber);
|
||||||
|
|
||||||
[ForeignKey("EnvelopeId")]
|
[ForeignKey("EnvelopeId")]
|
||||||
public Envelope Envelope { get; set; }
|
public Envelope
|
||||||
|
#if NET
|
||||||
|
?
|
||||||
|
#endif
|
||||||
|
Envelope { get; set; }
|
||||||
|
|
||||||
[ForeignKey("ReceiverId")]
|
[ForeignKey("ReceiverId")]
|
||||||
public Receiver Receiver { get; set; }
|
public Receiver
|
||||||
|
#if NET
|
||||||
|
?
|
||||||
|
#endif
|
||||||
|
Receiver { get; set; }
|
||||||
|
|
||||||
#region Model of old serice
|
#region Model of old serice
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
|
|||||||
22
EnvelopeGenerator.Domain/Interfaces/IHasEnvelope.cs
Normal file
22
EnvelopeGenerator.Domain/Interfaces/IHasEnvelope.cs
Normal file
@ -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
|
||||||
22
EnvelopeGenerator.Domain/Interfaces/IHasReceiver.cs
Normal file
22
EnvelopeGenerator.Domain/Interfaces/IHasReceiver.cs
Normal file
@ -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
|
||||||
Loading…
x
Reference in New Issue
Block a user