// EN: Queries for Inventory Service.
// VI: Queries cho Inventory Service.

using InventoryService.API.Application.DTOs;
using MediatR;

namespace InventoryService.API.Application.Queries;

/// <summary>
/// EN: Query to get inventory by shop.
/// VI: Query lấy inventory theo shop.
/// </summary>
public record GetInventoryByShopQuery(
    Guid ShopId,
    int Skip = 0,
    int Take = 50) : IRequest<PagedResult<InventoryItemDto>>;

/// <summary>
/// EN: Query to get stock level for specific product and shop.
/// VI: Query lấy mức tồn kho cho product và shop cụ thể.
/// </summary>
public record GetStockLevelQuery(
    Guid ProductId,
    Guid ShopId) : IRequest<InventoryItemDto?>;

/// <summary>
/// EN: Query to get transactions for inventory item.
/// VI: Query lấy transactions cho inventory item.
/// </summary>
public record GetTransactionsQuery(
    Guid InventoryItemId,
    int Skip = 0,
    int Take = 50) : IRequest<PagedResult<InventoryTransactionDto>>;

/// <summary>
/// EN: Query to get low stock items.
/// VI: Query lấy các items stock thấp.
/// </summary>
public record GetLowStockItemsQuery(
    Guid? ShopId = null,
    int Skip = 0,
    int Take = 50) : IRequest<PagedResult<InventoryItemDto>>;
