package com.realnet.DynamicDashbard.repositories;

import java.util.List;

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

import com.realnet.DynamicDashbard.entities.ChartType;
import com.realnet.DynamicDashbard.entities.UiComponent;

@Repository
public interface UiComponentRepository extends JpaRepository<UiComponent, Long> {
	List<UiComponent> findByChartType(ChartType chartType);

	List<UiComponent> findByChartTypeAndIsRequiredTrue(ChartType chartType);

	List<UiComponent> findByChartTypeOrderBySortOrder(ChartType chartType);
}