package com.smartoffice.leave;

import com.smartoffice.user.User;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface LeaveRepository extends JpaRepository<LeaveRequest, Long> {
    List<LeaveRequest> findAllByUserOrderByCreatedAtDesc(User user);
    List<LeaveRequest> findAllByStatusOrderByCreatedAtDesc(LeaveStatus status);
}
