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