package com.jasamedika.medifirst2000.dao;

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

@Repository("JenisSuratDao")
public interface JenisSuratDao extends PagingAndSortingRepository<JenisSurat, Integer> {

	@Query("select model from JenisSurat model where lower(model.name)=lower(:name)")
	JenisSurat findByIdName(@Param("name") String name);
	
	@Query("select model from JenisSurat model where model.id= :id")
	JenisSurat findById(@Param("id") Integer id);

}
