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

namespace adas_core.Application.Repositories.Interfaces;

public interface IServiceConfigRepository : IMongoRepository<ServiceConfig>
{
    /// <summary>
    /// Asynchronously retrieves a <see cref="ServiceConfig"/> by its unique <see cref="ObjectId"/>.
    /// Returns <c>null</c> when no matching service configuration is found.
    /// </summary>
    /// <param name="oid">The unique identifier of the service configuration to look up.</param>
    /// <returns>A <see cref="ServiceConfig"/> matching the provided identifier, or <c>null</c> if no configuration exists for that id.</returns>
    Task<ServiceConfig?> FindById(ObjectId oid);
    /// <summary>
    /// Retrieves a <see cref="ServiceConfig"/> by its identifier, returning <see langword="null"/> when no matching configuration is found.
    /// </summary>
    /// <param name="id">The unique identifier of the service configuration to look up.</param>
    /// <returns>A task that resolves to the matching <see cref="ServiceConfig"/>, or <see langword="null"/> if no configuration exists for the given id.</returns>
    Task<ServiceConfig?> FindById(string id);
}