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.
82 lines
1.9 KiB
82 lines
1.9 KiB
3 months ago
|
using FluentValidation;
|
||
|
using System;
|
||
|
|
||
|
namespace Kean.Domain.Wcs.Commands
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 发送输出命令
|
||
|
/// </summary>
|
||
|
public class SendOutputCommand : CommandValidator<SendOutputCommand>, ICommand
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 任务号
|
||
|
/// </summary>
|
||
|
public int Task { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 库房
|
||
|
/// </summary>
|
||
|
public string Warehouse { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 功能码
|
||
|
/// </summary>
|
||
|
public int Function { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 优先级
|
||
|
/// </summary>
|
||
|
public int Priority { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 条码
|
||
|
/// </summary>
|
||
|
public string Barcode { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 起始设备
|
||
|
/// </summary>
|
||
|
public string Original { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 库房
|
||
|
/// </summary>
|
||
|
public string EndWarehouse
|
||
|
{
|
||
|
get; set;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 终止设备
|
||
|
/// </summary>
|
||
|
public string Destination { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 数据
|
||
|
/// </summary>
|
||
|
public string Data { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 时间戳
|
||
|
/// </summary>
|
||
|
public DateTime Timestamp { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 验证项
|
||
|
/// </summary>
|
||
|
protected override void Validation()
|
||
|
{
|
||
|
RuleFor(r => r.Warehouse).NotEmpty().WithMessage("库房不允许空");
|
||
|
RuleFor(r => r.Function).NotEmpty().WithMessage("功能码不允许空");
|
||
|
RuleFor(r => r.Original).NotEmpty().WithMessage("起始设备不允许空");
|
||
|
RuleFor(r => r.Destination).NotEmpty().WithMessage("终止设备不允许空");
|
||
|
}
|
||
|
|
||
|
|
||
|
public string Operator
|
||
|
{
|
||
|
get; set;
|
||
|
}
|
||
|
}
|
||
|
}
|