package gc.mda.kcg.master;

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

import java.util.List;

public interface CodeMasterRepository extends JpaRepository<CodeMaster, String> {

    List<CodeMaster> findByGroupCodeAndIsActiveTrueOrderBySortOrder(String groupCode);

    List<CodeMaster> findByGroupCodeAndDepthOrderBySortOrder(String groupCode, int depth);

    List<CodeMaster> findByParentIdOrderBySortOrder(String parentId);
}
