package com.smartoffice.attendance;

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

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

public interface AttendanceRepository extends JpaRepository<AttendanceRecord, Long> {
    Optional<AttendanceRecord> findByUserAndAttendanceDate(User user, LocalDate date);
    List<AttendanceRecord> findAllByUserOrderByAttendanceDateDesc(User user);
}
