finalizare 1.0
This commit is contained in:
+24
-16
@@ -1,23 +1,31 @@
|
||||
using Application.Endpoints.Appointments;
|
||||
using Domain.Entities;
|
||||
using MongoDB.Driver;
|
||||
using Application.Endpoints.Appointments;
|
||||
|
||||
namespace Application.Services.Database.MongoDB;
|
||||
|
||||
public interface IAppointmentsMongoDbService
|
||||
{
|
||||
IMongoCollection<T> GetCollection<T>();
|
||||
|
||||
Task<List<T>> FindAsync<T>(List<(string FieldName, string Value)> criteria);
|
||||
|
||||
Task AddAsync<T>(T document);
|
||||
|
||||
Task ModifyAsync<T>(string keyField, string keyValue, T document);
|
||||
|
||||
Task DeleteAsync<T>(string keyField, string keyValue);
|
||||
|
||||
Task DeleteByIdAsync<T>(string id);
|
||||
|
||||
public Task<bool> IsAppointmentUnique(AppointmentManagementDto dto);
|
||||
|
||||
public Task<bool> DoesAppointmentExists(AppointmentManagementDto dto);
|
||||
}
|
||||
Task<List<T>> FindAsync<T>(List<(string FieldName, string Value)> criteria, CancellationToken token);
|
||||
|
||||
Task AddAsync<T>(T document, CancellationToken token);
|
||||
|
||||
Task ModifyAsync<T>(string keyField, string keyValue, T document, CancellationToken token);
|
||||
|
||||
Task DeleteAsync<T>(string keyField, string keyValue, CancellationToken token);
|
||||
|
||||
Task DeleteByIdAsync<T>(string id, CancellationToken token);
|
||||
|
||||
Task<bool> IsAppointmentUnique(AppointmentInformation request, CancellationToken token);
|
||||
|
||||
Task<bool> DoesAppointmentExists(AppointmentInformation request, CancellationToken token);
|
||||
|
||||
Task<List<Appointment>> FindPastAppointments(DateTime currentDate, CancellationToken token);
|
||||
|
||||
Task UpdateAppointment(Appointment appointment, CancellationToken token);
|
||||
|
||||
Task DeleteAppointment(string appointmentId, CancellationToken token);
|
||||
|
||||
Task<List<Appointment>> GetAllAppointments(CancellationToken token);
|
||||
}
|
||||
|
||||
@@ -6,13 +6,13 @@ public interface IChatMongoDbService
|
||||
{
|
||||
IMongoCollection<T> GetCollection<T>();
|
||||
|
||||
Task<List<T>> FindAsync<T>(List<(string FieldName, string Value)> criteria);
|
||||
Task<List<T>> FindAsync<T>(List<(string FieldName, string Value)> criteria, CancellationToken token);
|
||||
|
||||
Task AddAsync<T>(T document);
|
||||
Task AddAsync<T>(T document, CancellationToken token);
|
||||
|
||||
Task ModifyAsync<T>(string keyField, string keyValue, T document);
|
||||
Task ModifyAsync<T>(string keyField, string keyValue, T document, CancellationToken token);
|
||||
|
||||
Task DeleteAsync<T>(string keyField, string keyValue);
|
||||
Task DeleteAsync<T>(string keyField, string keyValue, CancellationToken token);
|
||||
|
||||
Task DeleteByIdAsync<T>(string id);
|
||||
Task DeleteByIdAsync<T>(string id, CancellationToken token);
|
||||
}
|
||||
@@ -6,13 +6,13 @@ public interface IMedicalHistoryMongoDbService
|
||||
{
|
||||
IMongoCollection<T> GetCollection<T>();
|
||||
|
||||
Task<List<T>> FindAsync<T>(List<(string FieldName, string Value)> criteria);
|
||||
Task<List<T>> FindAsync<T>(List<(string FieldName, string Value)> criteria, CancellationToken token);
|
||||
|
||||
Task AddAsync<T>(T document);
|
||||
Task AddAsync<T>(T document, CancellationToken token);
|
||||
|
||||
Task ModifyAsync<T>(string keyField, string keyValue, T document);
|
||||
Task ModifyAsync<T>(string keyField, string keyValue, T document, CancellationToken token);
|
||||
|
||||
Task DeleteAsync<T>(string keyField, string keyValue);
|
||||
Task DeleteAsync<T>(string keyField, string keyValue, CancellationToken token);
|
||||
|
||||
Task DeleteByIdAsync<T>(string id);
|
||||
Task DeleteByIdAsync<T>(string id, CancellationToken token);
|
||||
}
|
||||
Reference in New Issue
Block a user