CostCalculationItem/IRaCIS.Core.Application/AutoMapper/LogicChangeMappingProfile.cs

34 lines
1.1 KiB
C#

using IRaCIS.Application.ViewModels;
using IRaCIS.Domain.Models;
using AutoMapper;
using IRaCIS.Application.ViewModels.Pay;
namespace IRaCIS.Application.AutoMapper
{
public class LogicChangeMappingProfile : Profile
{
public LogicChangeMappingProfile()
{
//医生列表、项目显示列表模型转换
CreateMap<DoctorDTO, SelectionReviewerDTO>();
CreateMap<Message, SysMessageDTO>()
.ForMember(o => o.MessageTime, t => t.MapFrom(u => u.MessageTime.ToString()));
CreateMap<CRO, InstitutionDTO>()
.ForMember(o => o.InstitutionName, t => t.MapFrom(u => u.CROName));
CreateMap<Sponsor, InstitutionDTO>()
.ForMember(o => o.InstitutionName, t => t.MapFrom(u => u.SponsorName));
CreateMap<Hospital, InstitutionDTO>()
.ForMember(o => o.InstitutionName, t => t.MapFrom(u => u.HospitalName));
CreateMap<Site, InstitutionDTO>()
.ForMember(o => o.InstitutionName, t => t.MapFrom(u => u.SiteName));
CreateMap<PaymentAdjustmentCommand, PaymentAdjustment>();
}
}
}