package com.jasamedika.medifirst2000.dao;

import java.util.Map;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.jasamedika.medifirst2000.entities.JenisSatuanKerja;

@Repository("JenisSatuanKerjaDao")
public interface JenisSatuanKerjaDao extends PagingAndSortingRepository<JenisSatuanKerja, Integer> {
	
	@Query("select new Map(model.id as id, model.jenisSatuanKerja as jenisSatuanKerja, model.unitKerjaId as unitKerjaId) "
			+ "from JenisSatuanKerja model where model.id = :jenisSatuanKerjaId and model.statusEnabled is true")
	public Map<String, Object> getJenisSatuanKerjaById(@Param("jenisSatuanKerjaId") Integer jenisSatuanKerjaId);

}
