package de.oaa.xxx.dating;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.Set;
import java.util.UUID;

public interface DatingPassRepository extends JpaRepository<DatingPassEntity, UUID> {

    boolean existsByPasserIdAndPassedId(UUID passerId, UUID passedId);

    @Query("SELECT p.passedId FROM DatingPassEntity p WHERE p.passerId = :passerId")
    Set<UUID> findPassedIdsByPasserId(@Param("passerId") UUID passerId);
}
