package com.izouma.dingdong.repo;

import com.izouma.dingdong.domain.Appraisal;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;
import java.util.Optional;

public interface AppraisalRepo extends JpaRepository<Appraisal, Long>, JpaSpecificationExecutor<Appraisal> {

    Optional<Appraisal> findByOrderInfoId(Long orderId);

    List<Appraisal> findAllByMerchantId(Long merchantId);

    List<Appraisal> findAllByRiderId(Long riderId);


}