using FluentValidation;
using System;
namespace Kean.Domain.Wcs.Commands
{
///
/// 发送输出命令
///
public class SendOutputCommand : CommandValidator, ICommand
{
///
/// 任务号
///
public int Task { get; set; }
///
/// 库房
///
public string Warehouse { get; set; }
///
/// 功能码
///
public int Function { get; set; }
///
/// 优先级
///
public int Priority { get; set; }
///
/// 条码
///
public string Barcode { get; set; }
///
/// 起始设备
///
public string Original { get; set; }
///
/// 库房
///
public string EndWarehouse
{
get; set;
}
///
/// 终止设备
///
public string Destination { get; set; }
///
/// 数据
///
public string Data { get; set; }
///
/// 时间戳
///
public DateTime Timestamp { get; set; }
///
/// 验证项
///
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;
}
}
}