package ru.vyatsu.qr_access_admin.door.schedule.entity;

import org.springframework.data.jpa.repository.JpaRepository;

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

public interface ScheduleRepository extends JpaRepository<ScheduleEntity, String> {
    List<ScheduleEntity> findByDoorIdAndDateGreaterThanEqualAndDateLessThanEqualOrderByDateAsc(String doorId, LocalDate dateStart, LocalDate dateEnd);

    void deleteAllByDoorId(String doorId);
}