add girIgnore
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using audit.Model;
|
||||
using MongoDB.Bson;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using MongoDB.Driver;
|
||||
|
||||
namespace audit_logs.Repositories.Interfaces;
|
||||
|
||||
public interface IAuditRecordRepository : IMongoRepository<AuditRecord>
|
||||
{
|
||||
new Task InsertOneAsync(AuditRecord auditRecord);
|
||||
Task DeleteBeforeDate(DateTime date);
|
||||
Task<long> InsertBatch(IEnumerable<AuditRecord> auditRecords);
|
||||
Task<List<AuditRecord>> FindAllFromOrigin(ObjectId originId);
|
||||
Task<List<AuditRecord>> GetAllAuditRecordsAsync();
|
||||
Task<List<AuditRecord>> GetPaginatedAsync(int pageNumber, int pageSize);
|
||||
Task<long> CountDocumentsAsync(); // Nuevo método para contar documentos
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
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);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user