package com.jasamedika.medifirst2000.dao;

import com.jasamedika.medifirst2000.entities.KategoryPegawai;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.Map;

public interface KategoryPegawaiDao extends JpaRepository<KategoryPegawai, Integer> {
	@Query("select new Map(model.id as id, model.kategoryPegawai as kategoryPegawai) " + "from KategoryPegawai model "
			+ "where model.id = :kategoryPegawaiId " + "and model.statusEnabled is true")
	Map<String, Object> getKategoryPegawaiById(@Param("kategoryPegawaiId") Integer kategoryPegawaiId);
}
