package cd.casic.ci.process.process.converter;

import cd.casic.ci.process.dto.req.pipeline.AiPipelineCreateReq;
import cd.casic.ci.process.dto.req.pipeline.PipelineCreateReq;
import cd.casic.ci.process.dto.req.pipeline.PipelineUpdateReq;
import cd.casic.ci.process.dto.resp.pipeline.PipelineFindResp;
import cd.casic.ci.process.process.dataObject.pipeline.PipPipeline;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author HopeLi
 * @version v1.0
 * @ClassName PipelineConverter
 * @Date: 2025/5/13 14:39
 * @Description:
 */
@Mapper(componentModel = "spring")
public interface PipelineConverter {
    PipelineConverter INSTANCE = Mappers.getMapper(PipelineConverter.class);
    PipelineFindResp toResp(PipPipeline pipPipeline);
    PipPipeline reqToDO(PipelineCreateReq req);
    PipPipeline reqToDO(PipelineUpdateReq req);
    List<PipelineFindResp> toRespList(List<PipPipeline> pipPipelines);

    PipPipeline aiReqToDO(AiPipelineCreateReq req);
}
