package de.cannamanage.service.repository;

import de.cannamanage.domain.entity.ClubEvent;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.time.Instant;
import java.util.List;
import java.util.UUID;

@Repository
public interface ClubEventRepository extends JpaRepository<ClubEvent, UUID> {

    List<ClubEvent> findByTenantIdAndStartAtBetweenOrderByStartAtAsc(UUID tenantId, Instant from, Instant to);

    List<ClubEvent> findByTenantIdAndStartAtAfterOrderByStartAtAsc(UUID tenantId, Instant after, Pageable pageable);

    List<ClubEvent> findByStartAtBetweenAndReminderSentFalse(Instant from, Instant to);
}
