TbPunchInfoMapper.cs
560 Bytes
using NCC.Common.Helper;
using NCC.Common.Model;
using NCC.Education.Entitys.Dto.TbPunchInfo;
using Mapster;
using System.Collections.Generic;
namespace NCC.Education.Entitys.Mapper.TbPunchInfo
{
public class Mapper : IRegister
{
public void Register(TypeAdapterConfig config)
{
config.ForType<TbPunchInfoCrInput, TbPunchInfoEntity>()
.Map(dest => dest.Img, src => src.img.ToJson())
;
config.ForType<TbPunchInfoEntity, TbPunchInfoInfoOutput>()
.Map(dest => dest.img, src => src.Img.ToObject<List<FileControlsModel>>())
;
}
}
}