From 9d200800c5358ef559507fafa047bacd4abc3f61 Mon Sep 17 00:00:00 2001 From: TekH Date: Tue, 28 Oct 2025 14:10:32 +0100 Subject: [PATCH] feat: add position and size properties to ElementAnnotation entity - Added `X`, `Y`, `Width`, and `Height` properties with `float` database mapping. - Retains existing fields and database annotations. - Prepares the entity for spatial layout handling in documents. --- .../Entities/ElementAnnotation.cs | 32 +++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/EnvelopeGenerator.Domain/Entities/ElementAnnotation.cs b/EnvelopeGenerator.Domain/Entities/ElementAnnotation.cs index 8068da64..6e064556 100644 --- a/EnvelopeGenerator.Domain/Entities/ElementAnnotation.cs +++ b/EnvelopeGenerator.Domain/Entities/ElementAnnotation.cs @@ -36,6 +36,34 @@ public class ElementAnnotation [Column("TYPE", TypeName = "nvarchar(50)")] public string Type { get; set; } + [Column("POSITION_X", TypeName = "float")] + public double +#if NET + ? +#endif + X { get; set; } + + [Column("POSITION_Y", TypeName = "float")] + public double +#if NET + ? +#endif + Y { get; set; } + + [Column("WIDTH", TypeName = "float")] + public double +#if NET + ? +#endif + Width { get; set; } + + [Column("HEIGHT", TypeName = "float")] + public double +#if NET + ? +#endif + Height { get; set; } + [Required] [Column("ADDED_WHEN", TypeName = "datetime")] public DateTime AddedWhen { get; set; } @@ -52,10 +80,10 @@ public class ElementAnnotation ChangedWho { get; set; } [ForeignKey("ElementId")] - public virtual Signature + public virtual Signature #if NET ? -#endif +#endif Element { get; set; } }