package com.jasamedika.medifirst2000.dao;

import java.util.List;
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.MapKartuPengendaliToMetodeSubDetail;

@Repository("MapKartuPengendaliToMetodeSubDetailDao")
public interface MapKartuPengendaliToMetodeSubDetailDao extends PagingAndSortingRepository<MapKartuPengendaliToMetodeSubDetail, String> {

	@Query("select new Map(model.noRec as noRec,detail.name as name,model.tanggalMulai as tanggalMulai,model.tanggalSelesai as tanggalSelesai,model.keterangan as keterangan ) from MapKartuPengendaliToMetodeSubDetail model left join model.metodePengadaanSubDetail detail where model.kartuPengendaliId=:noRec")
	List<Map<String,Object>> findByParent(@Param("noRec") String noRec);


}
