package com.microservices.pms.pipeline.mapper;

import com.microservices.pms.pipeline.domain.PmsCiPipelines;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 流水线Mapper接口
 * 
 * @author wanjia
 * @date 2024-03-02
 */
@Mapper
public interface PmsCiPipelinesMapper 
{
    /**
     * 查询流水线
     * 
     * @param id 流水线主键
     * @return 流水线
     */
    public PmsCiPipelines selectPmsCiPipelinesById(Long id);

    /**
     * 查询流水线列表
     * 
     * @param pmsCiPipelines 流水线
     * @return 流水线集合
     */
    public List<PmsCiPipelines> selectPmsCiPipelinesList(PmsCiPipelines pmsCiPipelines);

    /**
     * 新增流水线
     * 
     * @param pmsCiPipelines 流水线
     * @return 结果
     */
    public int insertPmsCiPipelines(PmsCiPipelines pmsCiPipelines);

    /**
     * 修改流水线
     * 
     * @param pmsCiPipelines 流水线
     * @return 结果
     */
    public int updatePmsCiPipelines(PmsCiPipelines pmsCiPipelines);

    /**
     * 删除流水线
     * 
     * @param id 流水线主键
     * @return 结果
     */
    public int deletePmsCiPipelinesById(Long id);

    /**
     * 批量删除流水线
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deletePmsCiPipelinesByIds(Long[] ids);

    int selectCountByPipelineNameAndRepoInfo(@Param("pipelineName") String pipelineName, @Param("owner") String owner, @Param("repoIdentifier") String repoIdentifier, @Param("branch") String branch);
}
