using FluentValidation; using System.Collections.Generic; namespace Kean.Domain.Task.Commands { /// /// 创建启用命令 /// public class EnableCommand : CommandValidator, ICommand { /// /// 仓库 /// public int Warehouse { get; set; } /// /// 货位 /// public IEnumerable Cells { get; set; } /// /// 验证项 /// protected override void Validation() { RuleFor(r => r.Warehouse).NotEmpty().WithMessage("仓库不允许空"); RuleFor(r => r.Cells).NotEmpty().WithMessage("货位不允许空"); } /// /// 状态:True-可用;False-禁用;Null-不存在 /// [Output] public IEnumerable States { get; private set; } /// /// 备注 /// public string CellTag { get; set; } } }