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

@Repository("PenghasilanTidakKenaPajakDao")
public interface PenghasilanTidakKenaPajakDao extends PagingAndSortingRepository<PenghasilanTidakKenaPajak, Integer> {
	
	@Query("select new Map(model.id as id, model.deskripsi as deskripsi, model.statusPTKP as statusPTKP, model.totalHargaPTKP as totalHargaPTKP, model.statusPerkawinanId as statusPerkawinanId) "
			+ "from PenghasilanTidakKenaPajak model "
			+ "where model.id = :penghasilanTidakKenaPajakId and model.statusEnabled is true")
	public Map<String, Object> getPenghasilanTidakKenaPajakById(@Param("penghasilanTidakKenaPajakId") Integer penghasilanTidakKenaPajakId);

}
