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

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import com.ecep.contract.model.ContractBidVendor;

@Repository
public interface ContractBidVendorRepository extends
        // JDBC interfaces
        CrudRepository<ContractBidVendor, Integer>, PagingAndSortingRepository<ContractBidVendor, Integer>,
        // JPA interfaces
        JpaRepository<ContractBidVendor, Integer>, JpaSpecificationExecutor<ContractBidVendor> {

    List<ContractBidVendor> findByContractId(Integer contractId);

    List<ContractBidVendor> findByContractIdAndCompanyId(Integer contractId, Integer companyId);
}
