2025-08-26 19:20:44 +02:00

64 lines
1.3 KiB
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using EnvelopeGenerator.Domain.Interfaces;
#if NETFRAMEWORK
using System;
#endif
namespace EnvelopeGenerator.Domain.Entities
#if NET
;
#elif NETFRAMEWORK
{
#endif
[Table("TBSIG_DOCUMENT_STATUS", Schema = "dbo")]
public class DocumentStatus : IHasEnvelope, IHasReceiver
{
public DocumentStatus()
{
// TODO: * check Form Application and remove default value
#if NETFRAMEWORK
Status = Constants.DocumentStatus.Created;
#endif
}
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public int Id { get; set; }
[Required]
[Column("ENVELOPE_ID")]
public int EnvelopeId { get; set; }
[Required]
[Column("RECEIVER_ID")]
public int ReceiverId { get; set; }
[Required]
[Column("STATUS")]
public Constants.DocumentStatus Status { get; set; }
[Column("VALUE", TypeName = "nvarchar(max)")]
public string Value { get; set; }
[ForeignKey("EnvelopeId")]
public virtual Envelope
#if NET
?
#endif
Envelope { get; set; }
[ForeignKey("ReceiverId")]
public virtual Receiver
#if NET
?
#endif
Receiver { get; set; }
}
#if NETFRAMEWORK
}
#endif