From b599ada8641da9bad3cf658c7336c160da514300 Mon Sep 17 00:00:00 2001 From: TekH Date: Wed, 3 Sep 2025 15:17:03 +0200 Subject: [PATCH] add DocSignedNotification --- .../Behaviors/SignDocBehavior.cs | 12 ------------ .../Notifications/DocSignedNotification.cs | 16 ++++++++++++++++ .../DependencyInjection.cs | 10 ++++++---- .../Dto/DocumentStatusDto.cs | 5 +++-- .../EnvelopeGenerator.Application.csproj | 4 ++++ 5 files changed, 29 insertions(+), 18 deletions(-) delete mode 100644 EnvelopeGenerator.Application/Behaviors/SignDocBehavior.cs create mode 100644 EnvelopeGenerator.Application/Common/Notifications/DocSignedNotification.cs diff --git a/EnvelopeGenerator.Application/Behaviors/SignDocBehavior.cs b/EnvelopeGenerator.Application/Behaviors/SignDocBehavior.cs deleted file mode 100644 index 86f2d72f..00000000 --- a/EnvelopeGenerator.Application/Behaviors/SignDocBehavior.cs +++ /dev/null @@ -1,12 +0,0 @@ -using EnvelopeGenerator.Application.DocStatus.Commands; -using MediatR; - -namespace EnvelopeGenerator.Application.Behaviors; - -public class SignDocBehavior : IPipelineBehavior -{ - public Task Handle(SaveDocStatusCommand request, RequestHandlerDelegate next, CancellationToken cancellationToken) - { - throw new NotImplementedException(); - } -} diff --git a/EnvelopeGenerator.Application/Common/Notifications/DocSignedNotification.cs b/EnvelopeGenerator.Application/Common/Notifications/DocSignedNotification.cs new file mode 100644 index 00000000..3951e8f1 --- /dev/null +++ b/EnvelopeGenerator.Application/Common/Notifications/DocSignedNotification.cs @@ -0,0 +1,16 @@ +using EnvelopeGenerator.Application.Dto; +using EnvelopeGenerator.Domain.Entities; +using MediatR; + +namespace EnvelopeGenerator.Application.Common.Notifications; + +/// +/// +/// +public class DocSignedNotification : INotification +{ + /// + /// + /// + public required EnvelopeReceiver EnvelopeReceiver { get; init; } +} \ No newline at end of file diff --git a/EnvelopeGenerator.Application/DependencyInjection.cs b/EnvelopeGenerator.Application/DependencyInjection.cs index 59ee94ee..d561fc71 100644 --- a/EnvelopeGenerator.Application/DependencyInjection.cs +++ b/EnvelopeGenerator.Application/DependencyInjection.cs @@ -1,13 +1,14 @@ -using EnvelopeGenerator.Application.Configurations; +using DigitalData.Core.Client; +using EnvelopeGenerator.Application.Common.Notifications; +using EnvelopeGenerator.Application.Configurations; +using EnvelopeGenerator.Application.EnvelopeReceivers.Commands; +using EnvelopeGenerator.Application.Interfaces.Services; using EnvelopeGenerator.Application.Services; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; -using DigitalData.Core.Client; using QRCoder; -using EnvelopeGenerator.Application.Interfaces.Services; using System.Reflection; -using EnvelopeGenerator.Application.EnvelopeReceivers.Commands; namespace EnvelopeGenerator.Application; @@ -59,6 +60,7 @@ public static class DependencyInjection { cfg.RegisterServicesFromAssembly(Assembly.GetExecutingAssembly()); cfg.RegisterServicesFromAssembly(typeof(CreateEnvelopeReceiverCommandHandler).Assembly); + cfg.RegisterServicesFromAssembly(typeof(DocSignedNotification).Assembly); }); return services; diff --git a/EnvelopeGenerator.Application/Dto/DocumentStatusDto.cs b/EnvelopeGenerator.Application/Dto/DocumentStatusDto.cs index 7e6c0cd3..725bb49e 100644 --- a/EnvelopeGenerator.Application/Dto/DocumentStatusDto.cs +++ b/EnvelopeGenerator.Application/Dto/DocumentStatusDto.cs @@ -1,4 +1,5 @@ -using Microsoft.AspNetCore.Mvc; +using EnvelopeGenerator.Domain.Constants; +using Microsoft.AspNetCore.Mvc; namespace EnvelopeGenerator.Application.Dto; @@ -26,7 +27,7 @@ public class DocumentStatusDto /// /// Gets or sets the current status code. /// - public int Status { get; set; } + public EnvelopeStatus Status { get; set; } /// /// Gets or sets the timestamp when the status was changed. diff --git a/EnvelopeGenerator.Application/EnvelopeGenerator.Application.csproj b/EnvelopeGenerator.Application/EnvelopeGenerator.Application.csproj index 27b74ee1..5a743441 100644 --- a/EnvelopeGenerator.Application/EnvelopeGenerator.Application.csproj +++ b/EnvelopeGenerator.Application/EnvelopeGenerator.Application.csproj @@ -95,4 +95,8 @@ + + + +