package com.walkguide.repository;

import com.walkguide.entity.PairingRelation;
import com.walkguide.enums.PairingStatus;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.Optional;

@Repository
public interface PairingRelationRepository extends JpaRepository<PairingRelation, Long> {
    Optional<PairingRelation> findByGuardian_IdAndStatus(Long guardianId, PairingStatus status);
    Optional<PairingRelation> findByUser_IdAndStatus(Long userId, PairingStatus status);
    Optional<PairingRelation> findByGuardian_Id(Long guardianId);
    Optional<PairingRelation> findByUser_Id(Long userId);
    boolean existsByGuardian_IdAndStatus(Long guardianId, PairingStatus status);
    boolean existsByUser_IdAndStatus(Long userId, PairingStatus status);
}
