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

@Repository
public interface VendorFileRepository
        extends JpaRepository<VendorFile, Integer>, JpaSpecificationExecutor<VendorFile> {

    List<VendorFile> findAllByVendorId(int vendorId);

    List<VendorFile> findAllByVendorAndType(Vendor vendor, VendorFileType type);

    List<VendorFile> findByVendorId(int vendorId);
}