using PowderCoating.Core.Entities;
using PowderCoating.Core.Enums;

namespace PowderCoating.Core.Interfaces.Repositories;

/// <summary>
/// Typed repository for <see cref="InventoryTransaction"/> that adds a dynamic-filter
/// query for the Inventory Ledger view on top of the generic CRUD interface.
/// </summary>
public interface IInventoryTransactionRepository : IRepository<InventoryTransaction>
{
    /// <summary>
    /// Returns up to 500 non-deleted inventory transactions matching the supplied filters,
    /// ordered newest-first, with InventoryItem, PurchaseOrder, and Job navigations loaded.
    /// Null parameter values are treated as "no filter" for that dimension.
    /// </summary>
    Task<List<InventoryTransaction>> GetForLedgerAsync(
        int? itemId,
        DateTime? from,
        DateTime? to,
        InventoryTransactionType? type);
}
