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.
85 lines
2.1 KiB
C#
85 lines
2.1 KiB
C#
using System;
|
|
using EnvelopeGenerator.Domain.Interfaces;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
#if NETFRAMEWORK
|
|
#endif
|
|
|
|
namespace EnvelopeGenerator.Domain.Entities
|
|
{
|
|
[Table("TBSIG_DOCUMENT_RECEIVER_ELEMENT_ANNOTATION")]
|
|
public class ElementAnnotation : IHasAddedWhen, IHasChangedWhen, IHasChangedWho
|
|
{
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
[Column("GUID", TypeName = "bigint")]
|
|
public long Id { get; set; }
|
|
|
|
[Required]
|
|
[Column("ELEMENT_ID", TypeName = "int")]
|
|
public int ElementId { get; set; }
|
|
|
|
[Required]
|
|
[Column("NAME", TypeName = "nvarchar(100)")]
|
|
[StringLength(100)]
|
|
public string Name { get; set; }
|
|
|
|
[Required]
|
|
[Column("VALUE", TypeName = "nvarchar(max)")]
|
|
public string Value { get; set; }
|
|
|
|
[Required]
|
|
[Column("TYPE", TypeName = "nvarchar(50)")]
|
|
public string Type { get; set; }
|
|
|
|
[Column("POSITION_X", TypeName = "float")]
|
|
public double
|
|
#if nullable
|
|
?
|
|
#endif
|
|
X { get; set; }
|
|
|
|
[Column("POSITION_Y", TypeName = "float")]
|
|
public double
|
|
#if nullable
|
|
?
|
|
#endif
|
|
Y { get; set; }
|
|
|
|
[Column("WIDTH", TypeName = "float")]
|
|
public double
|
|
#if nullable
|
|
?
|
|
#endif
|
|
Width { get; set; }
|
|
|
|
[Column("HEIGHT", TypeName = "float")]
|
|
public double
|
|
#if nullable
|
|
?
|
|
#endif
|
|
Height { get; set; }
|
|
|
|
[Required]
|
|
[Column("ADDED_WHEN", TypeName = "datetime")]
|
|
public DateTime AddedWhen { get; set; }
|
|
|
|
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
|
public DateTime? ChangedWhen { get; set; }
|
|
|
|
[Column("CHANGED_WHO", TypeName = "nvarchar(100)")]
|
|
[StringLength(100)]
|
|
public string
|
|
#if nullable
|
|
?
|
|
#endif
|
|
ChangedWho { get; set; }
|
|
|
|
[ForeignKey("ElementId")]
|
|
public virtual Signature
|
|
#if nullable
|
|
?
|
|
#endif
|
|
Element { get; set; }
|
|
}
|
|
} |