package com.izouma.nineth.repo;

import com.izouma.nineth.domain.BalanceRecord;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

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

public interface BalanceRecordRepo extends JpaRepository<BalanceRecord, Long>, JpaSpecificationExecutor<BalanceRecord> {
    List<BalanceRecord> findByUserIdAndCreatedAtBetweenOrderByCreatedAt(Long userId, LocalDateTime start, LocalDateTime end);

    List<BalanceRecord> findByUserIdOrderByCreatedAt(Long userId);
}
