package br.gov.sigefp.rh.repository;

import br.gov.sigefp.rh.domain.PayrollPeriod;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;
import java.util.UUID;

@Repository
public interface PayrollPeriodRepository extends JpaRepository<PayrollPeriod, UUID> {
    
    Optional<PayrollPeriod> findByFiscalYearAndMonth(Integer fiscalYear, Integer month);
    
    boolean existsByFiscalYearAndMonth(Integer fiscalYear, Integer month);
}

