package com.infinite.focus.server.fcm;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import com.infinite.focus.server.auth.AccessCode;

@Repository
public interface StudentPushNotificationRepository extends PagingAndSortingRepository<StudentPushNotification, Long> {

	@Query(value = "SELECT * FROM student_push_notification WHERE student_id = ?1 or student_id = 0", nativeQuery = true)
	Page<StudentPushNotification> findByStudentId(Long student_id, Pageable pageable);
}
