package de.fete.domain.port.out;

import de.fete.domain.model.Rsvp;
import de.fete.domain.model.RsvpToken;
import java.util.List;

/** Outbound port for persisting and querying RSVPs. */
public interface RsvpRepository {

  /** Persists the given RSVP and returns it with generated fields populated. */
  Rsvp save(Rsvp rsvp);

  /** Counts the number of RSVPs for the given event. */
  long countByEventId(Long eventId);

  /** Finds all RSVPs for the given event, ordered by ID ascending. */
  List<Rsvp> findByEventId(Long eventId);

  /** Deletes an RSVP by event ID and RSVP token. Returns true if a record was deleted. */
  boolean deleteByEventIdAndRsvpToken(Long eventId, RsvpToken rsvpToken);
}
