using adas_core.Domain.Models;
using adas_core.Domain.Models.Filter;
using MongoDB.Bson;
using MongoDB.Driver;

namespace adas_core.Application.Repositories.Interfaces;

public interface IMedicineRepository : IMongoRepository<Medicine>
{
    Task<Medicine?> GetMedicine(string code);

    Task<List<Medicine>> GetMedicineByCodeOrNote(List<string> codeNotes);
    Task<Medicine?> GetMedicineByName(string name);
    Task<List<Medicine>> GetAll();
    Task<Medicine?> GetMedicineById(ObjectId medicineId);
    Task<Medicine?> PostMedicine(Medicine medicine);
    Task<Medicine?> UpdateMedicine(Medicine medicine);
    Task DeleteMedicineById(ObjectId medicineId);
    IAggregateFluent<BsonDocument> GetDistinctFieldDataQuery(string field);

    IFindFluent<Medicine, Medicine> GetPaginatedMedicines(PaginationFilter filter);
}