Files
PowderCoatingLogix/src/PowderCoating.Application/Mappings/BugReportProfile.cs
T
2026-04-23 21:38:24 -04:00

24 lines
929 B
C#

using AutoMapper;
using PowderCoating.Application.DTOs.BugReport;
using PowderCoating.Core.Entities;
namespace PowderCoating.Application.Mappings;
public class BugReportProfile : Profile
{
public BugReportProfile()
{
CreateMap<BugReport, BugReportDto>();
CreateMap<BugReport, EditBugReportDto>();
CreateMap<CreateBugReportDto, BugReport>();
CreateMap<EditBugReportDto, BugReport>()
.ForMember(dest => dest.SubmittedByUserId, opt => opt.Ignore())
.ForMember(dest => dest.SubmittedByUserName, opt => opt.Ignore())
.ForMember(dest => dest.CompanyName, opt => opt.Ignore())
.ForMember(dest => dest.CreatedAt, opt => opt.Ignore())
.ForMember(dest => dest.CompanyId, opt => opt.Ignore())
.ForMember(dest => dest.Attachments, opt => opt.Ignore());
CreateMap<BugReportAttachment, BugReportAttachmentDto>();
}
}