package es.uv.saic.domain;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface CalendariRepository extends JpaRepository<Calendari, Integer> {

	@Query(value="SELECT * FROM calendari WHERE data = current_date AND status = 'P';", nativeQuery=true)
	List<Calendari> getNextEvents(); 
	
}
