using adas_core.Domain.Models;

namespace adas_core.Application.Repositories.Interfaces;

public interface IRecordingAlertArchiveRepository : IMongoRepository<PatientRecordingAlert>
{
    /// <summary>
    /// Inserts a new patient recording alert into the underlying data store asynchronously.
    /// </summary>
    /// <param name="recordingAlert">The patient recording alert to be inserted.</param>
    new Task InsertOneAsync(PatientRecordingAlert recordingAlert);
    /// <summary>
    /// Asynchronously deletes records that have a date earlier than the specified threshold.
    /// </summary>
    /// <param name="date">The cutoff date; records with a date value before this will be removed.</param>
    Task DeleteBeforeDate(DateTime date);
    /// <summary>
    /// Inserts a batch of <see cref="PatientRecordingAlert"/> entities into the data store in a single operation.
    /// </summary>
    /// <param name="recordingAlerts">The collection of patient recording alerts to insert.</param>
    /// <returns>A task that represents the asynchronous batch insert operation, containing the number of affected or inserted records.</returns>
    Task<long> InsertBatch(IEnumerable<PatientRecordingAlert> recordingAlerts);
}