From 26bdb0806d577c367e51069d3db080d4eb4f8d6d Mon Sep 17 00:00:00 2001 From: TekH Date: Tue, 21 Oct 2025 09:09:56 +0200 Subject: [PATCH] feat(MappingProfile): add AutoMapper profile for CreateAnnotationCommand to Annotation --- .../Annotations/MappingProfile.cs | 20 +++++++++++++++++++ .../DocSigned/DocSignedNotification.cs | 1 - 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 EnvelopeGenerator.Application/Annotations/MappingProfile.cs diff --git a/EnvelopeGenerator.Application/Annotations/MappingProfile.cs b/EnvelopeGenerator.Application/Annotations/MappingProfile.cs new file mode 100644 index 00000000..f608b824 --- /dev/null +++ b/EnvelopeGenerator.Application/Annotations/MappingProfile.cs @@ -0,0 +1,20 @@ +using AutoMapper; +using EnvelopeGenerator.Application.Annotations.Commands; +using EnvelopeGenerator.Domain.Entities; + +namespace EnvelopeGenerator.Application.Annotations; + +/// +/// +/// +public class MappingProfile : Profile +{ + /// + /// + /// + public MappingProfile() + { + CreateMap() + .ForMember(dest => dest.AddedWhen, opt => opt.MapFrom(_ => DateTime.UtcNow)); + } +} \ No newline at end of file diff --git a/EnvelopeGenerator.Application/Common/Notifications/DocSigned/DocSignedNotification.cs b/EnvelopeGenerator.Application/Common/Notifications/DocSigned/DocSignedNotification.cs index 86e7681d..8da5d61f 100644 --- a/EnvelopeGenerator.Application/Common/Notifications/DocSigned/DocSignedNotification.cs +++ b/EnvelopeGenerator.Application/Common/Notifications/DocSigned/DocSignedNotification.cs @@ -2,7 +2,6 @@ using EnvelopeGenerator.Application.Common.Extensions; using EnvelopeGenerator.Domain.Constants; using MediatR; -using Newtonsoft.Json; using System.Dynamic; namespace EnvelopeGenerator.Application.Common.Notifications.DocSigned;