#region ========================================================================= USING ===================================================================================== using Lumina.Application.Common.DataAccess.Entities.MediaConsumption; using Lumina.Application.Common.DataAccess.Repositories.Common.Base; using Lumina.Domain.Common.Primitives; using Lumina.Domain.SharedKernel.Common.Enums.MediaLibrary; using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; #endregion namespace Lumina.Application.Common.DataAccess.Repositories.MediaConsumption; /// /// Interface for the repository for the consumption records used to build consumption statistics. /// public interface IConsumptionStatisticsRepository : IRepository { /// /// Gets the consumption records of the user identified by , optionally limited to a media library, a media kind, and a date /// range. /// /// The Id of the user whose consumption records are retrieved. /// The Id of the media library to restrict the records to, or for every library. /// The kind of media to restrict the records to, or for every kind. /// The start of the date range, or when the range has no start. /// The end of the date range, or when the range has no end. /// Cancellation token that can be used to stop the execution. /// An containing either the consumption records of the user, or an error. Task>> GetForUserAsync(Guid userId, Guid? libraryId, MediaKind? mediaKind, DateTime? fromUtc, DateTime? toUtc, CancellationToken cancellationToken); /// /// Gets the consumption records of every user, optionally limited to a media library, a media kind, and a date range. /// /// The Id of the media library to restrict the records to, or for every library. /// The kind of media to restrict the records to, or for every kind. /// The start of the date range, or when the range has no start. /// The end of the date range, or when the range has no end. /// Cancellation token that can be used to stop the execution. /// An containing either the consumption records of every user, or an error. Task>> GetForAllUsersAsync(Guid? libraryId, MediaKind? mediaKind, DateTime? fromUtc, DateTime? toUtc, CancellationToken cancellationToken); }