package com.microservices.pms.project.mapper;

import com.microservices.pms.project.domain.PmsProjectRepository;
import com.microservices.pms.project.domain.vo.PmsProjectRepositorySearchVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 项目-代码库Mapper接口
 * 
 * @author wanjia
 * @date 2023-10-11
 */
@Mapper
public interface PmsProjectRepositoryMapper
{
    /**
     * 查询项目-代码库
     * 
     * @param id 项目-代码库主键
     * @return 项目-代码库
     */
    public PmsProjectRepository selectPmsProjectRepositoryById(Long id);

    /**
     * 查询项目-代码库列表
     * 
     * @param pmsProjectRepository 项目-代码库
     * @return 项目-代码库集合
     */
    public List<PmsProjectRepository> selectPmsProjectRepositoryList(PmsProjectRepository pmsProjectRepository);

    /**
     * 新增项目-代码库
     * 
     * @param pmsProjectRepository 项目-代码库
     * @return 结果
     */
    public int insertPmsProjectRepository(PmsProjectRepository pmsProjectRepository);

    /**
     * 修改项目-代码库
     * 
     * @param pmsProjectRepository 项目-代码库
     * @return 结果
     */
    public int updatePmsProjectRepository(PmsProjectRepository pmsProjectRepository);

    /**
     * 删除项目-代码库
     * 
     * @param id 项目-代码库主键
     * @return 结果
     */
    public int deletePmsProjectRepositoryById(Long id);

    /**
     * 批量删除项目-代码库
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deletePmsProjectRepositoryByIds(Long[] ids);

    Integer countRepositoryByProjectId(@Param("projectId") Long projectId);

    int deletePmsProjectRepositoryByProjectId(@Param("projectId") Long projectId);

    List<Integer> selectPmsProjectRepoIdsByProjectId(@Param("pmsProjectId") Long pmsProjectId);

    Integer selectPmsProjectRepositoryCount(PmsProjectRepositorySearchVo pmsProjectRepositorySearchVo);

    Long[] selectLinkedRepositoryIdsByEnterpriseId(@Param("enterpriseId") Long enterpriseId);

    int countPmsProjectRepositoryByProjectRepositoryId(@Param("projectRepositoryId") Long projectRepositoryId);
}
