You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.4 KiB
62 lines
1.4 KiB
3 months ago
|
using FluentValidation;
|
||
|
using Kean.Domain.Stock.Models;
|
||
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
|
||
|
namespace Kean.Domain.Stock.Commands
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 合并命令
|
||
|
/// </summary>
|
||
|
public class CombineCommand : CommandValidator<CombineCommand>, ICommand
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 特征码
|
||
|
/// </summary>
|
||
|
internal const string Feature = "@Combine";
|
||
|
|
||
|
/// <summary>
|
||
|
/// 托盘条码
|
||
|
/// </summary>
|
||
|
public string Barcode { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 目标位置
|
||
|
/// </summary>
|
||
|
public int? Destination { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 库存行
|
||
|
/// </summary>
|
||
|
public IEnumerable<StockLine> Lines { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 满载
|
||
|
/// </summary>
|
||
|
public bool? Full { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 操作者
|
||
|
/// </summary>
|
||
|
public int Operator { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 标签
|
||
|
/// </summary>
|
||
|
public string Tag { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 时间戳
|
||
|
/// </summary>
|
||
|
internal DateTime? Timestamp { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 验证项
|
||
|
/// </summary>
|
||
|
protected override void Validation()
|
||
|
{
|
||
|
RuleFor(r => r.Lines).NotEmpty().WithMessage("库存行不允许空");
|
||
|
}
|
||
|
}
|
||
|
}
|