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

using MediatR;

namespace InventoryService.API.Application.Commands;

/// <summary>
/// EN: Command to perform stock in operation.
/// VI: Command để thực hiện nhập kho.
/// </summary>
public record StockInCommand(
    Guid ProductId,
    Guid ShopId,
    int Amount,
    string? Notes,
    Guid? ReferenceId) : IRequest<Guid>;

/// <summary>
/// EN: Command to perform stock out operation.
/// VI: Command để thực hiện xuất kho.
/// </summary>
public record StockOutCommand(
    Guid ProductId,
    Guid ShopId,
    int Amount,
    string? Notes,
    Guid? ReferenceId) : IRequest<bool>;

/// <summary>
/// EN: Command to reserve stock for order.
/// VI: Command để đặt trước stock cho order.
/// </summary>
public record ReserveStockCommand(
    Guid ProductId,
    Guid ShopId,
    int Amount,
    Guid OrderId) : IRequest<bool>;

/// <summary>
/// EN: Command to release stock reservation.
/// VI: Command để giải phóng đặt trước stock.
/// </summary>
public record ReleaseReservationCommand(
    Guid ProductId,
    Guid ShopId,
    int Amount,
    Guid OrderId) : IRequest<bool>;

/// <summary>
/// EN: Command to adjust stock (manual correction).
/// VI: Command để điều chỉnh stock (sửa thủ công).
/// </summary>
public record AdjustStockCommand(
    Guid ProductId,
    Guid ShopId,
    int NewQuantity,
    string Notes) : IRequest<bool>;
