package com.ikon.projectmanagement.repository;

import com.ikon.projectmanagement.entity.ProductOfProject;

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

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface ProductOfProjectRepository extends JpaRepository<ProductOfProject, UUID> {
    List<ProductOfProject> findByAccountIdAndProjectIdentifier(
            UUID accountId,
            UUID projectIdentifier);

    Optional<ProductOfProject> findByAccountIdAndProductIdentifier(
            UUID accountId,
            UUID productIdentifier);

    Optional<ProductOfProject> findByAccountIdAndProjectIdentifierAndProductIdentifier(UUID accountId, UUID projectIdentifier,
            UUID productIdentifier);
}