using adas_core.Domain.Models.Pumps;
using MongoDB.Bson;

namespace adas_core.Application.Repositories.Interfaces;

public interface IPumpAlarmEventRepository
{
    Task InsertAsync(PumpAlarmEvent alarmEvent);

    Task<IEnumerable<PumpAlarmEvent>> FindByDeviceIdAsync(
        string deviceId,
        DateTime? from = null,
        DateTime? to = null,
        int? limit = null);

    Task<PumpAlarmEvent?> FindLastByDeviceIdAsync(string deviceId);

    // cleanup
    Task DeleteByPatientId(ObjectId patientId);
    
    Task<long> UpdateManyObjectIdByFiledNameAsync(string fieldName, ObjectId newId, ObjectId oldId);
}