package it.micegroup.gestioneferie.pianificazioneferie.repository;

import org.springframework.stereotype.Repository;

import java.util.Optional;
import java.util.Collection;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import it.micegroup.gestioneferie.pianificazioneferie.entity.DstatiRichApprovPf;
import it.micegroup.gestioneferie.pianificazioneferie.entity.DstatiRichApprovPfKey;
import it.micegroup.gestioneferie.libs.repository.BaseRepository;

@Repository
@EnableJpaRepositories
public interface DstatiRichApprovPfRepository extends BaseRepository<DstatiRichApprovPf, DstatiRichApprovPfKey> {

	Optional<DstatiRichApprovPf> findByDstatiRichApprovPfKey(DstatiRichApprovPfKey id);

	@Query("DELETE FROM DstatiRichApprovPf WHERE dstatiRichApprovPfKey IN ?1")
	void deleteByIdIn(Collection<DstatiRichApprovPfKey> ids);
}
