package com.example.dateplanner.repositories;

import com.example.dateplanner.models.entities.EventApplication;
import org.springframework.data.repository.reactive.ReactiveCrudRepository;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import java.util.UUID;

public interface EventApplicationRepository extends ReactiveCrudRepository<EventApplication, UUID> {
    Flux<EventApplication> findByEventUuid(UUID eventUuid);
    Flux<EventApplication> findByClubUuid(UUID clubUuid);
    Mono<Long> countByEventUuid(UUID eventUuid);

    Flux<EventApplication> findByStatus(String status);
    Flux<EventApplication> findByEventUuidAndStatus(UUID eventUuid, String status);
    Flux<EventApplication> findByClubUuidAndStatus(UUID clubUuid, String status);

    Mono<Long> countByStatus(String status);
    Mono<Long> countByEventUuidAndStatus(UUID eventUuid, String status);
    Mono<Long> countByClubUuidAndStatus(UUID clubUuid, String status);
}
