package com.izouma.dingdong.repo.rider;

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

import java.time.LocalDateTime;
import java.util.List;
import java.util.Optional;

public interface RiderLocationRepo extends JpaRepository<RiderLocation, Long>, JpaSpecificationExecutor<RiderLocation> {

    //按创建时间查找
    List<RiderLocation> findAllByCreatedAt(LocalDateTime dateTime);

    Optional<RiderLocation> findLastByRiderId(Long riderId);
}