package com.davos.assessment.audit;

import java.util.List;
import com.davos.assessment.project.Project;
import org.springframework.data.jpa.repository.JpaRepository;

public interface AuditLogRepository extends JpaRepository<AuditLog, Long> {
  List<AuditLog> findTop100ByOrderByCreatedAtDesc();
  List<AuditLog> findTop100ByProjectOrderByCreatedAtDesc(Project project);
  List<AuditLog> findTop1000ByOrderByCreatedAtDesc();
  List<AuditLog> findTop1000ByProjectOrderByCreatedAtDesc(Project project);
  List<AuditLog> findAllByOrderByCreatedAtDesc();
  List<AuditLog> findByProjectOrderByCreatedAtDesc(Project project);
  long deleteByCreatedAtBefore(java.time.Instant cutoff);
}
