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.
38 lines
1.4 KiB
38 lines
1.4 KiB
3 months ago
|
using AutoMapper;
|
||
|
using Kean.Domain.Material.Commands;
|
||
|
using Kean.Domain.Material.Events;
|
||
|
using Kean.Domain.Material.Models;
|
||
|
|
||
|
namespace Kean.Domain.Material
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 模型映射配置
|
||
|
/// </summary>
|
||
|
public class AutoMapper : Profile
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 初始化 Kean.Domain.Material.AutoMapper 类的新实例
|
||
|
/// </summary>
|
||
|
public AutoMapper()
|
||
|
{
|
||
|
CreateMap<CreateMaterialCommand, Models.Material>();
|
||
|
CreateMap<ModifyMaterialCommand, Models.Material>();
|
||
|
CreateMap<CreateMaterialCommand, CreateMaterialSuccessEvent>();
|
||
|
CreateMap<ModifyMaterialCommand, ModifyMaterialSuccessEvent>();
|
||
|
CreateMap<DeleteMaterialCommand, DeleteMaterialSuccessEvent>();
|
||
|
|
||
|
CreateMap<CreateCategoryCommand, Category>();
|
||
|
CreateMap<ModifyCategoryCommand, Category>();
|
||
|
CreateMap<CreateCategoryCommand, CreateCategorySuccessEvent>();
|
||
|
CreateMap<ModifyCategoryCommand, ModifyCategorySuccessEvent>();
|
||
|
CreateMap<DeleteCategoryCommand, DeleteCategorySuccessEvent>();
|
||
|
|
||
|
CreateMap<CreateSafetyCommand, Safety>();
|
||
|
CreateMap<ModifySafetyCommand, Safety>();
|
||
|
CreateMap<CreateSafetyCommand, CreateSafetySuccessEvent>();
|
||
|
CreateMap<ModifySafetyCommand, ModifySafetySuccessEvent>();
|
||
|
CreateMap<DeleteSafetyCommand, DeleteSafetySuccessEvent>();
|
||
|
}
|
||
|
}
|
||
|
}
|