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.stereotype.Repository;

import com.ecep.contract.ContractFileType;
import com.ecep.contract.model.Contract;
import com.ecep.contract.model.ContractFile;

@Repository
public interface ContractFileRepository extends JpaRepository<ContractFile, Integer>, JpaSpecificationExecutor<ContractFile> {
    List<ContractFile> findByContract(Contract contract);

    List<ContractFile> findAllByContract(Contract contract);

    List<ContractFile> findAllByContractAndType(Contract contract, ContractFileType type);
}