using FluentValidation;
namespace DS.Module.Core.Data;
///
/// 企业用户审批实体
///
public class CommonAuditInput
{
///
/// ID
///
public long Id { get; set; }
///
/// 审核状态
///
public int Status { get; set; }
///
/// 审批备注
///
public string AuditNote { get; set; } = "";
}
///
/// 验证
///
public class CommonAuditInputValidator : AbstractValidator
{
///
/// 构造函数
///
public CommonAuditInputValidator()
{
this.RuleFor(o => o.Id)
.NotEmpty().WithName("ID");
this.RuleFor(o => o.Status)
.NotEmpty().WithName("审核选项").InclusiveBetween(1, 2).WithMessage("非法状态");
}
}