using MediatR;
using TakeoutSaaS.Application.App.Inventory.Dto;
namespace TakeoutSaaS.Application.App.Inventory.Commands;
///
/// 扣减库存命令(履约/支付成功)。
///
public sealed record DeductInventoryCommand : IRequest
{
///
/// 门店 ID。
///
public long StoreId { get; init; }
///
/// SKU ID。
///
public long ProductSkuId { get; init; }
///
/// 扣减数量。
///
public int Quantity { get; init; }
///
/// 是否预售锁定转扣减。
///
public bool IsPresaleOrder { get; init; }
///
/// 幂等键(与锁定请求一致可避免重复扣减)。
///
public string? IdempotencyKey { get; init; }
}