using Extrudex.Domain.Entities;
namespace Extrudex.Domain.Interfaces;
///
/// Service for persisting and querying filament usage records.
/// Tracks consumption per print job and per spool for COGS and inventory tracking.
///
public interface IFilamentUsageService
{
///
/// Records a new filament usage entry for a print job.
///
/// The print job that consumed the filament.
/// The spool that provided the filament.
/// The printer that executed the print.
/// Grams of filament consumed.
/// Millimeters of filament extruded.
/// Optional notes about this usage record.
/// Cancellation token.
/// The created FilamentUsage entity.
Task RecordUsageAsync(
Guid printJobId,
Guid spoolId,
Guid printerId,
decimal gramsUsed,
decimal mmExtruded,
string? notes = null,
CancellationToken cancellationToken = default);
///
/// Retrieves all filament usage records for a specific print job.
///
/// The print job ID.
/// Cancellation token.
/// Collection of filament usage records for the print job.
Task> GetByPrintJobAsync(
Guid printJobId,
CancellationToken cancellationToken = default);
///
/// Retrieves all filament usage records for a specific spool.
///
/// The spool ID.
/// Cancellation token.
/// Collection of filament usage records for the spool.
Task> GetBySpoolAsync(
Guid spoolId,
CancellationToken cancellationToken = default);
}