namespace audit_logs.Repositories.Interfaces;
using MongoDB.Bson;
using MongoDB.Driver;
public interface IMongoRepository<T>
{
    IMongoCollection<T> Collection { get; }

    string GetCollectionName();
    Task InsertOneAsync(T obj);
    Task<T?> DeleteAsync(ObjectId id);
    Task UpdateOneAsync(ObjectId id, T obj);
    Task<IEnumerable<T>> GetPaginatedAsync(int pageNumber, int pageSize,FilterDefinition<T>? filter = null, SortDefinition<T> sort=null);

    Task<long> CountDocumentsAsync(FilterDefinition<T>? filter = null);

}