package net.educoder.ecsonar.dao;

import net.educoder.ecsonar.model.Issues;
import net.educoder.ecsonar.model.dto.DegreeDTO;

import java.util.List;

/**
 * @Author: youys
 * @Date: 2022/12/20
 * @Description:
 */
public interface IssuesDao {


    /**
     * 查询issue总记录数
     * @param projectUuid
     * @param issueType
     * @param severity
     * @return
     */
    Integer getPageIssuesCount(String projectUuid,Integer issueType, String severity);

    /**
     * 分页查询issue列表
     * @param projectUuid
     * @param issueType
     * @param severity
     * @param start
     * @param pageSize
     * @return
     */
    List<Issues> getPageIssues(String projectUuid,Integer issueType, String severity, Integer start, Integer pageSize);


    /**
     * 查询不同程度的漏洞、缺陷、代码规范数量
     * @param projectUuid
     * @param issueType
     * @return
     */
    DegreeDTO queryDegree(String projectUuid, Integer issueType, Integer metricId);


    /**
     * 根据id查询
     * @param issueId
     * @return
     */
    Issues queryById(Long issueId);
}
