package com.izouma.jmrh.repo.stat;

import com.izouma.jmrh.domain.stat.OrgNumStat;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;
import java.util.Optional;

public interface OrgNumStatRepo extends JpaRepository<OrgNumStat, Long>, JpaSpecificationExecutor<OrgNumStat> {

    List<OrgNumStat> findByYear(int year);

    List<OrgNumStat> findByYearAndMonth(int year, int month);

    Optional<OrgNumStat> findFirstByYearAndMonthAndCity(int year, int month,String city);
}