24 lines
929 B
C#
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>();
|
|
}
|
|
}
|