feat: 完善库存锁定幂等与批次扣减策略
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
using MediatR;
|
||||
using TakeoutSaaS.Application.App.Inventory.Dto;
|
||||
|
||||
namespace TakeoutSaaS.Application.App.Inventory.Commands;
|
||||
|
||||
/// <summary>
|
||||
/// 新增或更新库存批次命令。
|
||||
/// </summary>
|
||||
public sealed record UpsertInventoryBatchCommand : IRequest<InventoryBatchDto>
|
||||
{
|
||||
/// <summary>
|
||||
/// 门店 ID。
|
||||
/// </summary>
|
||||
public long StoreId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// SKU ID。
|
||||
/// </summary>
|
||||
public long ProductSkuId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 批次号。
|
||||
/// </summary>
|
||||
public string BatchNumber { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 生产日期。
|
||||
/// </summary>
|
||||
public DateTime? ProductionDate { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 过期日期。
|
||||
/// </summary>
|
||||
public DateTime? ExpireDate { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库数量。
|
||||
/// </summary>
|
||||
public int Quantity { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 剩余数量。
|
||||
/// </summary>
|
||||
public int RemainingQuantity { get; init; }
|
||||
}
|
||||
Reference in New Issue
Block a user