168 lines
4.1 KiB
C#
168 lines
4.1 KiB
C#
using AutoMapper;
|
|
using IRaCIS.Application.Interfaces;
|
|
using IRaCIS.Application.ViewModels;
|
|
using IRaCIS.Application.ViewModels.Pay;
|
|
using IRaCIS.Core.Application.Contracts.Dicom.DTO;
|
|
using IRaCIS.Core.Application.Contracts.DTO;
|
|
using IRaCIS.Core.Domain.Models;
|
|
|
|
namespace IRaCIS.Core.Application.Contracts.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<VacationCommand, Vacation>();
|
|
|
|
|
|
CreateMap<AttachmentDTO, Attachment>();
|
|
|
|
CreateMap<ReviewerAckDTO, Attachment>();
|
|
|
|
#endregion
|
|
|
|
|
|
#region trial
|
|
|
|
|
|
//临床项目
|
|
CreateMap<TrialCommand, IRaCIS.Core.Domain.Models.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<ExchangeRateCommand, ExchangeRate>();
|
|
|
|
CreateMap<AwardPriceCommand, VolumeReward>();
|
|
|
|
CreateMap<TrialRevenuesPriceDTO, TrialRevenuesPrice>();
|
|
|
|
CreateMap<TrialSOWPathDTO, TrialPaymentPrice>();
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region image
|
|
|
|
CreateMap<TrialAttachmentCommand, TrialAttachment>();
|
|
CreateMap<VisitPlanCommand, VisitStage>();
|
|
CreateMap<SubjectVisitCommand, SubjectVisit>();
|
|
CreateMap<StudyCommand, DicomStudy>();
|
|
CreateMap<SubjectDTO, Subject>();
|
|
CreateMap<SubjectCommand, Subject>();
|
|
|
|
CreateMap<ImageQACommand, ImageQA>();
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
#region QA
|
|
CreateMap<QATemplateCommand, QATemplate>();
|
|
|
|
CreateMap<QARecordCommand, QARecord>();
|
|
|
|
CreateMap<QADictionaryCommand,QADictionary>();
|
|
|
|
CreateMap<QADialogCommand, QADialog>();
|
|
|
|
CreateMap<QATemplateConfigCommand, QATemplateDictionary>();
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
CreateMap<ReportDTO, Report>();
|
|
CreateMap<ImageLabelDTO, ImageLabel>();
|
|
|
|
CreateMap<GlobalReportCommand, GlobalRS>();
|
|
|
|
|
|
}
|
|
}
|
|
} |