using FluentValidation; namespace Kean.Domain.Identity.Commands { /// /// 初始化密码命令 /// public class InitializePasswordCommand : CommandValidator, ICommand { /// /// 身份标识 /// public int Id { get; set; } /// /// 密码 /// public string Replacement { get; set; } /// /// 验证项 /// protected override void Validation() { RuleFor(r => r.Replacement).NotEmpty().WithMessage("密码不允许空"); } } }