using FluentValidation; namespace Kean.Domain.Message.Commands { /// /// 连线命令 /// public class ConnectCommand : CommandValidator, ICommand { /// /// 令牌 /// public string Token { get; set; } /// /// 连接码 /// public string Id { get; set; } /// /// 验证项 /// protected override void Validation() { RuleFor(r => r.Token).NotEmpty().WithMessage("令牌不允许空"); RuleFor(r => r.Id).NotEmpty().WithMessage("连接码不允许空"); } } }