using AutoMapper; using IRaCIS.Application.ViewModels; using IRaCIS.Application.ViewModels.Pay; using IRaCIS.Core.Domain.Models; namespace IRaCIS.Core.Application.Contracts.AutoMapper { public class LogicChangeMappingProfile : Profile { public LogicChangeMappingProfile() { //医生列表、项目显示列表模型转换 CreateMap(); CreateMap() .ForMember(o => o.MessageTime, t => t.MapFrom(u => u.MessageTime.ToString())); CreateMap() .ForMember(o => o.InstitutionName, t => t.MapFrom(u => u.CROName)); CreateMap() .ForMember(o => o.InstitutionName, t => t.MapFrom(u => u.SponsorName)); CreateMap() .ForMember(o => o.InstitutionName, t => t.MapFrom(u => u.HospitalName)); CreateMap() .ForMember(o => o.InstitutionName, t => t.MapFrom(u => u.SiteName)); CreateMap() .ForMember(t=>t.YearMonthDate, u=>u.MapFrom(t=>t.YearMonth)) .ForMember(t=>t.YearMonth, u=>u.MapFrom(t=>t.YearMonth.ToString("yyyy-MM"))); CreateMap(); CreateMap(); } } }