package de.cannamanage.service.repository;

import de.cannamanage.domain.entity.EventRsvp;
import de.cannamanage.domain.enums.RsvpStatus;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;
import java.util.UUID;

@Repository
public interface EventRsvpRepository extends JpaRepository<EventRsvp, UUID> {

    List<EventRsvp> findByEventId(UUID eventId);

    Optional<EventRsvp> findByEventIdAndMemberId(UUID eventId, UUID memberId);

    long countByEventIdAndStatus(UUID eventId, RsvpStatus status);

    List<EventRsvp> findByEventIdAndStatusIn(UUID eventId, List<RsvpStatus> statuses);
}
