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.
29 lines
642 B
29 lines
642 B
3 months ago
|
using FluentValidation;
|
||
|
|
||
|
namespace Kean.Domain.Task.Commands
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 任务阻塞命令
|
||
|
/// </summary>
|
||
|
public class BlockCommand : CommandValidator<BlockCommand>, ICommand
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 标识
|
||
|
/// </summary>
|
||
|
public int Id { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 异常信息
|
||
|
/// </summary>
|
||
|
public string Message { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 验证项
|
||
|
/// </summary>
|
||
|
protected override void Validation()
|
||
|
{
|
||
|
RuleFor(r => r.Id).NotEmpty().WithMessage("标识不允许空");
|
||
|
}
|
||
|
}
|
||
|
}
|