package com.bytesw.bytebot.repository;

import com.bytesw.bytebot.model.WeekScheduler;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;

import java.math.BigInteger;
import java.util.List;
import java.util.Optional;

public interface WeekSchedulerRepository extends CrudRepository<WeekScheduler, BigInteger>, JpaSpecificationExecutor<WeekScheduler> {
    
    @Query("select b from WeekScheduler b where b.calendarID = :caleId")
    Optional<List<WeekScheduler>> findByCalendarId(@Param("caleId") String caleId);

}
