
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.DynamicField;

@Repository
public interface DynamicFieldRepository extends JpaRepository<DynamicField, Long> {
    List<DynamicField> findByChartType(ChartType chartType);
    List<DynamicField> findByChartTypeAndIsRequiredTrue(ChartType chartType);
    List<DynamicField> findByChartTypeAndShowInUiTrueOrderBySortOrder(ChartType chartType);
    List<DynamicField> findByChartTypeOrderBySortOrder(ChartType chartType);
}