package common.repository;

import common.model.BPUContract;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
public interface BPUContractRepository extends JpaRepository<BPUContract, Long> {

    @Query(value = "SELECT * from bpucontract where product = ?1", nativeQuery = true)
    List<BPUContract> findByProduct(String code);
}
