using Furion.JsonSerialization;
using YBEE.EQM.Core;

namespace YBEE.EQM.Application;

/// <summary>
/// 审核记录映射
/// </summary>
public class AuditMapper : IRegister
{
    public void Register(TypeAdapterConfig config)
    {
        config.ForType<ExamSpecialStudent, ExamSpecialStudentOutput>().Map(d => d.AuditList, s => JSON.Deserialize<List<AuditItem>>(s.Audits, null));
        config.ForType<ExamAbsentReplace, ExamAbsentReplaceOutput>().Map(d => d.AuditList, s => JSON.Deserialize<List<AuditItem>>(s.Audits, null));
    }
}
