package com.magistr.app.repository;

import com.magistr.app.model.TimeSlotDateAssignment;
import org.springframework.data.jpa.repository.JpaRepository;

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

public interface TimeSlotDateAssignmentRepository extends JpaRepository<TimeSlotDateAssignment, Long> {

    Optional<TimeSlotDateAssignment> findByDate(LocalDate date);

    List<TimeSlotDateAssignment> findAllByOrderByDateAsc();

    List<TimeSlotDateAssignment> findByDateBetweenOrderByDateAsc(LocalDate startDate, LocalDate endDate);

    boolean existsByTimeSlotScopeId(Long scopeId);
}
