package de.effigenix.infrastructure.inventory.persistence.repository;

import de.effigenix.infrastructure.inventory.persistence.entity.StockMovementEntity;
import org.springframework.data.jpa.repository.JpaRepository;

import java.time.Instant;
import java.util.List;

public interface StockMovementJpaRepository extends JpaRepository<StockMovementEntity, String> {

    List<StockMovementEntity> findAllByStockId(String stockId);

    List<StockMovementEntity> findAllByArticleId(String articleId);

    List<StockMovementEntity> findAllByMovementType(String movementType);

    List<StockMovementEntity> findAllByBatchId(String batchId);

    List<StockMovementEntity> findAllByPerformedAtBetween(Instant from, Instant to);
}
