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.
45 lines
1.1 KiB
45 lines
1.1 KiB
3 months ago
|
using FluentValidation;
|
||
|
using System.Collections.Generic;
|
||
|
|
||
|
namespace Kean.Domain.Task.Commands
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 创建禁用命令
|
||
|
/// </summary>
|
||
|
public class DisableCommand : CommandValidator<DisableCommand>, ICommand
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 仓库
|
||
|
/// </summary>
|
||
|
public int Warehouse { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 货位
|
||
|
/// </summary>
|
||
|
public IEnumerable<string> Cells { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 验证项
|
||
|
/// </summary>
|
||
|
protected override void Validation()
|
||
|
{
|
||
|
RuleFor(r => r.Warehouse).NotEmpty().WithMessage("仓库不允许空");
|
||
|
RuleFor(r => r.Cells).NotEmpty().WithMessage("货位不允许空");
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 状态:True-可用;False-禁用;Null-不存在
|
||
|
/// </summary>
|
||
|
[Output]
|
||
|
public IEnumerable<bool?> States { get; private set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 备注
|
||
|
/// </summary>
|
||
|
public string CellTag
|
||
|
{
|
||
|
get; set;
|
||
|
}
|
||
|
}
|
||
|
}
|