You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
941 B
31 lines
941 B
3 months ago
|
using AutoMapper;
|
||
|
using Kean.Domain.Wcs.Commands;
|
||
|
using Kean.Domain.Wcs.Events;
|
||
|
using Kean.Domain.Wcs.Models;
|
||
|
|
||
|
namespace Kean.Domain.Wcs
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 模型映射配置
|
||
|
/// </summary>
|
||
|
public class AutoMapper : Profile
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 初始化 Kean.Domain.Wcs.AutoMapper 类的新实例
|
||
|
/// </summary>
|
||
|
public AutoMapper()
|
||
|
{
|
||
|
CreateMap<Input, AcceptInputCommand>();
|
||
|
CreateMap<AcceptInputCommand, AcceptInputSuccessEvent>().ForMember(@event => @event.Fallback, options => options.Ignore());
|
||
|
CreateMap<Input, LogInputCommand>().ReverseMap();
|
||
|
|
||
|
CreateMap<SendOutputCommand, Output>();
|
||
|
CreateMap<Output, SyncOutputCommand>();
|
||
|
CreateMap<SyncOutputCommand, SyncOutputSuccessEvent>();
|
||
|
CreateMap<StationModel, SyncStationCommand>();
|
||
|
|
||
|
CreateMap<WcsTask, Output>();
|
||
|
}
|
||
|
}
|
||
|
}
|