package com.walkguide.repository;
import com.walkguide.entity.LocationHistory;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.Optional;
@Repository
public interface LocationHistoryRepository extends JpaRepository<LocationHistory, Long> {
    Optional<LocationHistory> findTopByUserIdOrderByCreatedAtDesc(Long userId);
    Page<LocationHistory> findByUserIdOrderByCreatedAtDesc(Long userId, Pageable pageable);
}
