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

@Repository("StatusPerkawinanDao")
public interface StatusPerkawinanDao extends PagingAndSortingRepository<StatusPerkawinan, Integer> {
	
	@Query("select new Map(model.id as id, model.statusPerkawinan as statusPerkawinan) from StatusPerkawinan model where model.id = :statusPerkawinanId and model.statusEnabled is true")
	public Map<String, Object> getStatusPerkawinanById(@Param("statusPerkawinanId") Integer statusPerkawinanId);
	
	@Query("select new Map(model.id as id, model.statusPerkawinan as statusPerkawinan) from StatusPerkawinanPegawai model where model.id = :statusPerkawinanPegawaiId and model.statusEnabled is true")
	public Map<String, Object> getStatusPerkawinanPegawaiById(@Param("statusPerkawinanPegawaiId") Integer statusPerkawinanPegawaiId);

}
