You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
871 B
C#
39 lines
871 B
C#
using FluentValidation;
|
|
|
|
namespace DS.Module.Core.Data;
|
|
|
|
/// <summary>
|
|
/// 企业用户审批实体
|
|
/// </summary>
|
|
public class CommonAuditInput
|
|
{
|
|
/// <summary>
|
|
/// ID
|
|
/// </summary>
|
|
public long Id { get; set; }
|
|
/// <summary>
|
|
/// 审核状态
|
|
/// </summary>
|
|
public int Status { get; set; }
|
|
|
|
/// <summary>
|
|
/// 审批备注
|
|
/// </summary>
|
|
public string AuditNote { get; set; } = "";
|
|
}
|
|
/// <summary>
|
|
/// 验证
|
|
/// </summary>
|
|
public class CommonAuditInputValidator : AbstractValidator<CommonAuditInput>
|
|
{
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
public CommonAuditInputValidator()
|
|
{
|
|
this.RuleFor(o => o.Id)
|
|
.NotEmpty().WithName("ID");
|
|
this.RuleFor(o => o.Status)
|
|
.NotEmpty().WithName("审核选项").InclusiveBetween(1, 2).WithMessage("非法状态") ;
|
|
}
|
|
} |