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

import cd.casic.ci.process.dto.req.resource.ResourceCreateReq;
import cd.casic.ci.process.dto.req.resource.ResourceUpdateReq;
import cd.casic.ci.process.dto.resp.resource.ResourceDetailResp;
import cd.casic.ci.process.dto.resp.resource.ResourceListResp;
import cd.casic.ci.process.process.dataObject.resource.PipResourceManager;
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 ResourceConverter {
    ResourceConverter INSTANCE = Mappers.getMapper(ResourceConverter.class);
    ResourceDetailResp converter(PipResourceManager manager);
    PipResourceManager converter(ResourceUpdateReq req);
    PipResourceManager converter(ResourceCreateReq req);
    List<ResourceListResp> converter(List<PipResourceManager> manager);
}
