From a258dcdad099782fd75298118bb4c879cf84734f Mon Sep 17 00:00:00 2001 From: TekH Date: Mon, 13 Oct 2025 09:40:41 +0200 Subject: [PATCH] feat(Annotation): add Annotation entity for document receiver element annotations - Added Annotation entity mapped to table TBSIG_DOCUMENT_RECEIVER_ELEMENT_ANNOTATION - Included data annotations for key, required fields, and relationships - Added conditional compilation for .NET and .NET Framework compatibility --- .../Entities/Annotation.cs | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 EnvelopeGenerator.Domain/Entities/Annotation.cs diff --git a/EnvelopeGenerator.Domain/Entities/Annotation.cs b/EnvelopeGenerator.Domain/Entities/Annotation.cs new file mode 100644 index 00000000..e08f9ab6 --- /dev/null +++ b/EnvelopeGenerator.Domain/Entities/Annotation.cs @@ -0,0 +1,56 @@ +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +#if NETFRAMEWORK +using System; +#endif + +namespace EnvelopeGenerator.Domain.Entities +#if NET + ; +#elif NETFRAMEWORK + { +#endif + +[Table("TBSIG_DOCUMENT_RECEIVER_ELEMENT_ANNOTATION")] +public class Annotation +{ + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + [Column("GUID", TypeName = "int")] + public int Guid { 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("ADDED_WHEN", TypeName = "datetime")] + public DateTime AddedWhen { get; set; } + + [Column("CHANGED_WHEN", TypeName = "datetime")] + public DateTime? ChangedWhen { get; set; } + + [Column("CHANGED_WHO", TypeName = "nchar(100)")] + [StringLength(100)] + public string +#if NET + ? +#endif + ChangedWho { get; set; } + + [ForeignKey("ElementId")] + public virtual Signature Element { get; set; } +} + +#if NETFRAMEWORK + } +#endif \ No newline at end of file