NceePlanMapper.cs 546 B

1234567891011121314
  1. using Furion.JsonSerialization;
  2. using YBEE.EQM.Core;
  3. namespace YBEE.EQM.Application;
  4. public class NceePlanMapper : IRegister
  5. {
  6. public void Register(TypeAdapterConfig config)
  7. {
  8. config.ForType<NceePlan, NceePlanOutput>().Map(d => d.Config, s => JSON.Deserialize<NceePlanConfig>(s.Config, null));
  9. config.ForType<AddNceePlanInput, NceePlan>().Map(d => d.Config, s => JSON.Serialize(s.Config, null));
  10. config.ForType<UpdateNceePlanInput, NceePlan>().Map(d => d.Config, s => JSON.Serialize(s.Config, null));
  11. }
  12. }