AttachmentMapper.cs 579 B

12345678910111213141516
  1. using Furion.JsonSerialization;
  2. using YBEE.EQM.Core;
  3. namespace YBEE.EQM.Application;
  4. /// <summary>
  5. /// 附件信息转换
  6. /// </summary>
  7. public class AttachmentMapper : IRegister
  8. {
  9. public void Register(TypeAdapterConfig config)
  10. {
  11. config.ForType<ExamSpecialStudent, ExamSpecialStudentOutput>().Map(d => d.AttachmentList, s => JSON.Deserialize<List<AttachmentItem>>(s.Attachments, null));
  12. config.ForType<ExamOrgDataReport, ExamOrgDataReportOutput>().Map(d => d.AttachmentList, s => JSON.Deserialize<List<AttachmentItem>>(s.Attachments, null));
  13. }
  14. }