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

import java.util.List;

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

import com.ecep.contract.model.CompanyVendor;
import com.ecep.contract.model.CompanyVendorApprovedItem;
import com.ecep.contract.model.CompanyVendorApprovedList;

/**
 * 合格供方名录
 */
@Repository
public interface CompanyVendorApprovedItemRepository extends
        JpaRepository<CompanyVendorApprovedItem, Integer>, JpaSpecificationExecutor<CompanyVendorApprovedItem> {

    List<CompanyVendorApprovedItem> findAllByList(CompanyVendorApprovedList list);

    List<CompanyVendorApprovedItem> findAllByListAndVendor(CompanyVendorApprovedList list, CompanyVendor vendor);

    CompanyVendorApprovedItem findByListAndVendor(CompanyVendorApprovedList list, CompanyVendor vendor);
}
