Large-scale cleanup of entity and interface classes: - Removed obsolete #if NET/NETFRAMEWORK preprocessor blocks - Unified class/property formatting and indentation - Standardized use of data annotations - Improved nullable reference type handling - Simplified interfaces (IHasEnvelope, IHasReceiver) - Removed redundant and dead code - No changes to business logic or data model These changes modernize and standardize the codebase for easier maintenance and .NET compatibility.
61 lines
1.6 KiB
C#
61 lines
1.6 KiB
C#
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using DigitalData.Core.Abstractions.Interfaces;
|
|
using EnvelopeGenerator.Domain.Interfaces;
|
|
|
|
namespace EnvelopeGenerator.Domain.Entities
|
|
{
|
|
[Table("TBSIG_DOCUMENT_STATUS", Schema = "dbo")]
|
|
public class DocumentStatus : IHasEnvelope, IHasReceiver, IEntity, IHasAddedWhen, IHasChangedWhen
|
|
{
|
|
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; }
|
|
|
|
[Required]
|
|
[Column("ADDED_WHEN", TypeName = "datetime")]
|
|
public DateTime AddedWhen { get; set; }
|
|
|
|
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
|
public DateTime? ChangedWhen { get; set; }
|
|
|
|
[Column("VALUE", TypeName = "nvarchar(max)")]
|
|
public string Value { get; set; }
|
|
|
|
[ForeignKey("EnvelopeId")]
|
|
public virtual Envelope
|
|
#if nullable
|
|
?
|
|
#endif
|
|
Envelope { get; set; }
|
|
|
|
[ForeignKey("ReceiverId")]
|
|
public virtual Receiver
|
|
#if nullable
|
|
?
|
|
#endif
|
|
Receiver { get; set; }
|
|
}
|
|
} |