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.CompanyVendorFileType;
import com.ecep.contract.model.CompanyVendor;
import com.ecep.contract.model.CompanyVendorFile;

@Repository
public interface CompanyVendorFileRepository
        extends JpaRepository<CompanyVendorFile, Integer>, JpaSpecificationExecutor<CompanyVendorFile> {

    List<CompanyVendorFile> findAllByVendorId(int vendorId);

    List<CompanyVendorFile> findAllByVendorAndType(CompanyVendor vendor, CompanyVendorFileType type);

    List<CompanyVendorFile> findByVendorId(int vendorId);
}