package com.walkguide.repository;

import com.walkguide.entity.ActivityLog;
import com.walkguide.enums.ActivityLogType;
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.time.LocalDateTime;
import java.util.List;

@Repository
public interface ActivityLogRepository extends JpaRepository<ActivityLog, Long> {
    Page<ActivityLog> findByUser_IdOrderByCreatedAtDesc(Long userId, Pageable pageable);
    List<ActivityLog> findByUser_IdAndCreatedAtBetween(Long userId, LocalDateTime from, LocalDateTime to);
    List<ActivityLog> findByUser_IdAndLogTypeOrderByCreatedAtDesc(Long userId, ActivityLogType logType, Pageable pageable);
}
