package com.walkguide.repository;
import com.walkguide.entity.GuardianNotification;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface GuardianNotificationRepository extends JpaRepository<GuardianNotification, Long> {
    Page<GuardianNotification> findByUserIdOrderByCreatedAtDesc(Long userId, Pageable pageable);
    long countByUserIdAndIsReadFalse(Long userId);
    List<GuardianNotification> findByUserIdAndIsReadFalseOrderByCreatedAtAsc(Long userId);
    java.util.Optional<GuardianNotification> findByIdAndUserId(Long id, Long userId);
}
