package cn.ey.biz.module.system.convert.job;

import cn.ey.biz.module.system.api.job.dto.ReportInfoDTO;
import cn.ey.biz.module.system.dal.dataobject.job.SystemJobDO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

/**
 * 任务表 Convert
 */
@Mapper
public interface JobConvert {

    JobConvert INSTANCE = Mappers.getMapper(JobConvert.class);

    @Mappings({
            @Mapping(expression = "java(JobProcessConverter.stringToMap(systemJobDO.getAppendedWfContext()))", target = "appendedWfContext"),
    })
    ReportInfoDTO convert(SystemJobDO systemJobDO);
}
