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.
35 lines
831 B
35 lines
831 B
3 months ago
|
using FluentValidation;
|
||
|
|
||
|
namespace Kean.Domain.Identity.Commands
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 导航命令
|
||
|
/// </summary>
|
||
|
public class NavigateCommand : CommandValidator<NavigateCommand>, ICommand
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 令牌
|
||
|
/// </summary>
|
||
|
public string Token { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// URL
|
||
|
/// </summary>
|
||
|
public string Url { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 忽略项
|
||
|
/// </summary>
|
||
|
public string[] Ignore { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 验证项
|
||
|
/// </summary>
|
||
|
protected override void Validation()
|
||
|
{
|
||
|
RuleFor(r => r.Token).NotEmpty().WithMessage("令牌不允许空");
|
||
|
RuleFor(r => r.Url).NotEmpty().WithMessage("URL 不允许空");
|
||
|
}
|
||
|
}
|
||
|
}
|