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.Vendor;
import com.ecep.contract.model.VendorApprovedItem;
import com.ecep.contract.model.VendorApproved;

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

    List<VendorApprovedItem> findAllByList(VendorApproved list);

    List<VendorApprovedItem> findAllByListAndVendor(VendorApproved list, Vendor vendor);

    VendorApprovedItem findByListAndVendor(VendorApproved list, Vendor vendor);
}
