using AutoMapper; using EnvelopeGenerator.Application.Dto.EnvelopeHistory; using EnvelopeGenerator.Application.Dto.EnvelopeReceiver; using EnvelopeGenerator.Application.Dto.EnvelopeReceiverReadOnly; using EnvelopeGenerator.Application.Dto.Messaging; using EnvelopeGenerator.Application.Dto.Receiver; using EnvelopeGenerator.Application.Extensions; using EnvelopeGenerator.Application.Receivers.Commands; using EnvelopeGenerator.Domain.Entities; namespace EnvelopeGenerator.Application.Dto; /// /// Represents the AutoMapper profile configuration for mapping between /// domain entities and data transfer objects (DTOs) used within the EnvelopeGenerator application. /// public class MappingProfile : Profile { /// /// Initializes a new instance of the class. /// Configures the mappings between entities and DTOs used throughout the application. /// public MappingProfile() { // Entity to DTO mappings CreateMap(); CreateMap(); CreateMap(); CreateMap(); CreateMap(); CreateMap(); CreateMap(); CreateMap(); CreateMap(); CreateMap(); CreateMap(); CreateMap(); CreateMap(); CreateMap(); // DTO to Entity mappings CreateMap(); CreateMap(); CreateMap(); CreateMap(); CreateMap(); CreateMap(); CreateMap(); CreateMap(); CreateMap(); CreateMap(); CreateMap().ForMember(rcv => rcv.EnvelopeReceivers, rcvReadDto => rcvReadDto.Ignore()); CreateMap(); CreateMap(); CreateMap(); // Messaging mappings // for GTX messaging CreateMap() .ConstructUsing(gtxRes => gtxRes.Ok() ? new SmsResponse() { Ok = true } : new SmsResponse() { Ok = false, Errors = gtxRes }); } }