From adce61feadd8d126632bb864816dd5ed5ec82264 Mon Sep 17 00:00:00 2001 From: TekH Date: Mon, 13 Oct 2025 10:59:58 +0200 Subject: [PATCH] feat: add CreateAnnotationCommand record for annotation creation --- .../Annotations/Commands/CreateAnnotationCommand.cs | 9 +++++++++ EnvelopeGenerator.Domain/Entities/Document.cs | 12 ++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 EnvelopeGenerator.Application/Annotations/Commands/CreateAnnotationCommand.cs diff --git a/EnvelopeGenerator.Application/Annotations/Commands/CreateAnnotationCommand.cs b/EnvelopeGenerator.Application/Annotations/Commands/CreateAnnotationCommand.cs new file mode 100644 index 00000000..8cac0465 --- /dev/null +++ b/EnvelopeGenerator.Application/Annotations/Commands/CreateAnnotationCommand.cs @@ -0,0 +1,9 @@ +using EnvelopeGenerator.Application.Common.Query; +using MediatR; + +namespace EnvelopeGenerator.Application.Annotations.Commands; + +/// +/// +/// +public record CreateAnnotationCommand : EnvelopeReceiverQueryBase, IRequest; \ No newline at end of file diff --git a/EnvelopeGenerator.Domain/Entities/Document.cs b/EnvelopeGenerator.Domain/Entities/Document.cs index 1c1df65c..c4c9910f 100644 --- a/EnvelopeGenerator.Domain/Entities/Document.cs +++ b/EnvelopeGenerator.Domain/Entities/Document.cs @@ -1,4 +1,5 @@ -using System.ComponentModel.DataAnnotations; +using EnvelopeGenerator.Domain.Interfaces; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; #if NETFRAMEWORK using System.Drawing; @@ -14,7 +15,7 @@ namespace EnvelopeGenerator.Domain.Entities #endif [Table("TBSIG_ENVELOPE_DOCUMENT", Schema = "dbo")] -public class Document +public class Document : IHasEnvelope { public Document() { @@ -41,6 +42,13 @@ public class Document [NotMapped] public string Filepath { get; set; } + [ForeignKey("EnvelopeId")] + public virtual Envelope +#if NET + ? +#endif + Envelope { get; set; } + #if NETFRAMEWORK [NotMapped] public string FileNameOriginal { get; set; }