package com.ikon.projectmanagement.repository;

import com.ikon.projectmanagement.entity.Risks;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.UUID;

@Repository
public interface RiskRepository extends JpaRepository<Risks, UUID> {

    List<Risks> findByProjectIdentifier(UUID projectIdentifier);

    List<Risks> findByRiskStatus(String riskStatus);

    List<Risks> findByRiskOwner(String riskOwner);

    boolean existsByRiskTitleAndProjectIdentifier(String riskTitle, UUID projectIdentifier);

    Risks findByRiskIdentifierAndProjectIdentifier(UUID riskIdentifier, UUID projectIdentifier);
}