山东雷驰
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.

69 lines
1.5 KiB

3 months ago
using FluentValidation;
namespace Kean.Domain.Wcs.Commands
{
/// <summary>
/// 接受输入命令
/// </summary>
public class AcceptInputCommand : CommandValidator<AcceptInputCommand>, ICommand
{
/// <summary>
/// 库房
/// </summary>
public string Warehouse { get; set; }
/// <summary>
/// 功能码
/// </summary>
public string Function { get; set; }
/// <summary>
/// 设备号
/// </summary>
public string Device { get; set; }
/// <summary>
/// 条码
/// </summary>
public string Barcode { get; set; }
/// <summary>
/// 参数
/// </summary>
public string Parameters { get; set; }
/// <summary>
/// 验证项
/// </summary>
protected override void Validation()
{
RuleFor(r => r.Function).NotEmpty().WithMessage("功能码不允许空");
RuleFor(r => r.Device).NotEmpty().WithMessage("设备号不允许空");
}
/// <summary>
/// 降级指令
/// </summary>
[Output]
public AcceptInputCommand Fallback { get; private set; }
/// <summary>
/// 标识
/// </summary>
public int Id
{
get; set;
}
public string Para01
{
get; set;
}
public string Para02
{
get; set;
}
}
}