using System;
using MediatR;
using TakeoutSaaS.Application.App.Inventory.Dto;
namespace TakeoutSaaS.Application.App.Inventory.Commands;
///
/// 锁定库存命令。
///
public sealed record LockInventoryCommand : IRequest
{
///
/// 门店 ID。
///
public long StoreId { get; init; }
///
/// SKU ID。
///
public long ProductSkuId { get; init; }
///
/// 锁定数量。
///
public int Quantity { get; init; }
///
/// 是否按预售逻辑锁定。
///
public bool IsPresaleOrder { get; init; }
///
/// 锁定过期时间(UTC),超时可释放。
///
public DateTime? ExpiresAt { get; init; }
///
/// 幂等键(同一键重复调用返回同一结果)。
///
public string IdempotencyKey { get; init; } = string.Empty;
}