49 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			C#
		
	
	
			
		
		
	
	
			49 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			C#
		
	
	
| using AutoMapper;
 | |
| using IRaCIS.Application.Contracts;
 | |
| using IRaCIS.Core.Application.Contracts;
 | |
| using IRaCIS.Core.Application.ViewModel;
 | |
| using IRaCIS.Core.Domain.Models;
 | |
| 
 | |
| namespace IRaCIS.Core.Application.Service
 | |
| {
 | |
|     public class CommonConfig : Profile
 | |
|     {
 | |
|         public CommonConfig()
 | |
|         {
 | |
|             CreateMap<Message, SysMessageDTO>()
 | |
|               .ForMember(o => o.MessageTime, t => t.MapFrom(u => u.MessageTime.ToString()));
 | |
| 
 | |
|             CreateMap<SystemLog, SystemLogDTO>();
 | |
| 
 | |
|             CreateMap<SystemLogDTO, SystemLog>();
 | |
| 
 | |
|             CreateMap<FrontAuditConfig, FrontAuditConfigAddOrEdit>().ReverseMap();
 | |
| 
 | |
|             CreateMap<EmailNoticeConfigAddOrEdit, EmailNoticeConfig>().ReverseMap();
 | |
|             CreateMap<EmailNoticeConfig, EmailNoticeConfigView>();
 | |
| 
 | |
| 
 | |
|             CreateMap<SystemBasicData, SystemBasicDataView>();
 | |
| 
 | |
|             CreateMap<SystemBasicData, SystemBasicDataSelect>()
 | |
|                  .ForMember(o => o.ParentCode, t => t.MapFrom(u => u.Parent.Code));
 | |
| 
 | |
|             CreateMap<SystemBasicDataAddOrEdit, SystemBasicData>().ReverseMap();
 | |
| 
 | |
| 
 | |
| 
 | |
|             CreateMap<Dictionary, BasicDicView>()
 | |
|                  .ForMember(o => o.ConfigType, t => t.MapFrom(u => u.ConfigDictionary.Code))
 | |
|                  .ForMember(o => o.ConfigTypeDes, t => t.MapFrom(u => u.ConfigDictionary.Description));
 | |
| 
 | |
|             CreateMap<AddOrEditBasicDic, Dictionary>().ReverseMap();
 | |
| 
 | |
| 
 | |
|             CreateMap<Dictionary, BasicDicSelect>()
 | |
|                  .ForMember(o => o.ParentCode, t => t.MapFrom(u => u.Parent.Code));
 | |
| 
 | |
|         }
 | |
|     }
 | |
|    
 | |
| }
 |