Documentation modifications
This commit is contained in:
@@ -19,6 +19,12 @@ namespace adas_core.Infrastructure.Repositories
|
||||
{
|
||||
private readonly ApiSettings _apiSettings;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PumpArchiveRepository"/> class, forwarding <paramref name="database"/> to the base repository and storing the resolved <see cref="ApiSettings"/> configuration for subsequent operations.
|
||||
/// </summary>
|
||||
/// <param name="apiSettings">The <see cref="IOptions{ApiSettings}"/> wrapper whose <see cref="IOptions{T}.Value"/> supplies the current <see cref="ApiSettings"/>.</param>
|
||||
/// <param name="database">The <see cref="IMongoDatabase"/> connection passed to the base class constructor.</param>
|
||||
/// <!-- aidoc:v1 sig=875c7ca body=12fddac -->
|
||||
public PumpArchiveRepository(IOptions<ApiSettings> apiSettings, IMongoDatabase database)
|
||||
: base(database)
|
||||
{
|
||||
@@ -26,12 +32,21 @@ namespace adas_core.Infrastructure.Repositories
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns the agreed MongoDB collection name used to store archived pump observations for patients, falling back to the default value when the corresponding setting is not configured.
|
||||
/// </summary>
|
||||
/// <returns>The collection name to use, either the value configured in <c>ArchivePatientsPumpobservations</c> or the default <c>archive_pumpobservations</c>.</returns>
|
||||
/// <!-- aidoc:v1 sig=94e22ff body=09ed313 -->
|
||||
public override string GetCollectionName()
|
||||
{
|
||||
// Nombre de colección pactado: "archive_pumpobservations"
|
||||
return _apiSettings.ArchivePatientsPumpobservations ?? "archive_pumpobservations";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the MongoDB indexes required by the <see cref="PumpObservation"/> collection: an ascending index on <see cref="PumpObservation.PatientId"/> for patient-based lookups and audits, a compound index on <see cref="PumpObservation.DeviceId"/> (ascending) and <see cref="PumpObservation.Time"/> (descending) for per-device timelines, and a descending index on <see cref="PumpObservation.Time"/> for chronological ordering.
|
||||
/// </summary>
|
||||
/// <!-- aidoc:v1 sig=4955da2 body=2c1d18d -->
|
||||
public override async Task CreateIndexes()
|
||||
{
|
||||
var indexModels = new List<CreateIndexModel<PumpObservation>>
|
||||
|
||||
Reference in New Issue
Block a user