package com.infinite.focus.server.wall;

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 TopPicksRepository extends JpaRepository<TopPicks, Long> {
	
	@Query(value = "SELECT * FROM top_picks WHERE is_daily_top_picks = true", nativeQuery = true)
	TopPicks findDailyTopPicks();

	// Full query
	@Query(value = "SELECT * FROM top_picks ORDER BY top_picks_id", nativeQuery = true)
	List<TopPicks> findAllOrderById();
}
