CostCalculationItem/IRaCIS.Core.Application/AutoMapper/ViewModelToDomainMappingPro...

141 lines
3.4 KiB
C#

using AutoMapper;
using IRaCIS.Application.Interfaces;
using IRaCIS.Application.ViewModels;
using IRaCIS.Application.ViewModels.Pay;
using IRaCIS.Core.Domain;
using IRaCIS.Domain;
using IRaCIS.Domain.Models;
namespace IRaCIS.Application.AutoMapper
{
public class ViewModelToDomainMappingProfile : Profile
{
public ViewModelToDomainMappingProfile()
{
#region reviewer
//基本信息 工作信息 添加时转换使用
CreateMap<DoctorBasicInfoCommand, Doctor>();
//学习经历 添加时转换使用
CreateMap<EducationCommand, Education>();
CreateMap<PostgraduateCommand, Postgraduate>();
CreateMap<ResearchPublicationDTO, ResearchPublication>();
CreateMap<TrialExperienceCommand, TrialExperience>();
//医生账户
CreateMap<DoctorAccountLoginDTO, Doctor>();
CreateMap<DoctorAccountRegisterDTO, Doctor>();
CreateMap<VacationDTO, Vacation>();
CreateMap<AttachmentDTO, Attachment>();
CreateMap<ReviewerAckDTO, Attachment>();
#endregion
#region trial
//临床项目
CreateMap<TrialCommand, Trial>();
#endregion
#region workLoad
//工作量
CreateMap<WorkloadCommand, Workload>();
#endregion
CreateMap<DicViewModelDTO, Dictionary>();
CreateMap<UserTrialCommand, UserTrial>();
CreateMap<SiteCRCCommand, UserTrial>();
CreateMap<SystemLogDTO, SystemLog>();
#region management
CreateMap<RoleCommand, Role>();
CreateMap<UserCommand, User>();
CreateMap<UserCommand, User>();
CreateMap<MenuFunctionCommand, MenuFunction>();
//CreateMap<FunctionAddOrUpdateModel, Function>();
#endregion
#region institution
CreateMap<HospitalCommand, Hospital>();
CreateMap<CROCompanyDTO, CRO>();
CreateMap<SiteCommand, Site>();
CreateMap<SponsorCommand, Sponsor>();
//CreateMap<SiteViewModel, Site>();
//CreateMap<HospitalViewModel, Hospital>();
//CreateMap<SponsorViewModel, Sponsor>();
#endregion
#region financial
CreateMap<TrialPaymentPriceCommand, TrialPaymentPrice>();
CreateMap<ReviewerPayInfoCommand, ReviewerPayInformation>();
CreateMap<RankPriceCOmmand, RankPrice>();
CreateMap<AwardPriceCommand, VolumeReward>();
CreateMap<PaymentCommand, Payment>();
CreateMap<PaymentDetailCommand, PaymentDetail>();
CreateMap<ExchangeRateDTO, ExchangeRate>();
CreateMap<AwardPriceCommand, VolumeReward>();
#endregion
#region image
CreateMap<ImageAcquisitionSpecificationDTO, ImageAcquisitionSpecification>();
CreateMap<VisitPlanDTO, VisitPlan>();
CreateMap<VisitPointDTO, VisitPoint>();
CreateMap<ClinicalStudySubjectsDTO, ClinicalStudySubjects>();
CreateMap<ClinicalStudySubjectsCommand, ClinicalStudySubjects>();
CreateMap<ImageDTO, ImageRecord>();
CreateMap<ImageCommand, ImageRecord>();
#endregion
}
}
}