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