package com.izouma.jmrh.repo.stat;

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

import java.time.LocalDateTime;
import java.util.List;
import java.util.Optional;

public interface ProjectNumStatRepo extends JpaRepository<ProjectNumStat, Long>, JpaSpecificationExecutor<ProjectNumStat> {

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

    long countByCreatedAtBetween(LocalDateTime start, LocalDateTime end);
}