package de.oaa.xxx.dating;

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

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

public interface DatingLikeRepository extends JpaRepository<DatingLikeEntity, UUID> {

    boolean existsByLikerIdAndLikedId(UUID likerId, UUID likedId);

    void deleteByLikerIdAndLikedId(UUID likerId, UUID likedId);

    /** Alle User-IDs, die der Liker geliked hat. */
    List<DatingLikeEntity> findByLikerId(UUID likerId);

    /** Alle Likes, die auf den User zeigen (wer hat ihn geliked). */
    List<DatingLikeEntity> findByLikedId(UUID likedId);

    void deleteByLikerIdOrLikedId(UUID likerId, UUID likedId);
}
