TbMbtLineMapper.cs 552 Bytes
using NCC.Common.Helper;
using NCC.Common.Model;
using NCC.Blind.Entitys.Dto.TbMbtLine;
using Mapster;
using System.Collections.Generic;

namespace NCC.Blind.Entitys.Mapper.TbMbtLine
{
	public class Mapper : IRegister
	{
		public void Register(TypeAdapterConfig config)
		{
			config.ForType<TbMbtLineCrInput, TbMbtLineEntity>()
				.Map(dest => dest.Banner, src => src.banner.ToJson())
			;
			config.ForType<TbMbtLineEntity, TbMbtLineInfoOutput>()
				.Map(dest => dest.banner, src => src.Banner.ToObject<List<FileControlsModel>>())
			;
		}
	}
}