package com.ecep.contract.ds.contract.repository;

import com.ecep.contract.ds.contract.model.ContractItem;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

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

@Repository
public interface ContractItemRepository extends JpaRepository<ContractItem, Integer>, JpaSpecificationExecutor<ContractItem> {

    Optional<ContractItem> findByRowId(String rowId);

    List<ContractItem> findAllByItemCode(String itemCode);

    List<ContractItem> findByContractId(int contractId);

    List<ContractItem> findByInventoryId(int inventoryId);


}