package kr.co.accura.wtm.domain.project.repository;

import kr.co.accura.wtm.domain.project.entity.ProjectAssignment;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProjectAssignmentRepository extends JpaRepository<ProjectAssignment, Long> {

    List<ProjectAssignment> findByProject_Id(Long projectId);

    List<ProjectAssignment> findByUser_Id(Long userId);

    boolean existsByProject_IdAndUser_Id(Long projectId, Long userId);
}
