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.

46 lines
883 B
C#

12 months ago
using FluentValidation;
namespace DS.WMS.Core.Sys.Dtos;
12 months ago
/// <summary>
///
/// </summary>
public class RoleInput
{
/// <summary>
///
/// </summary>
11 months ago
public long Id { get; set; }
12 months ago
/// <summary>
/// 唯一编码
/// </summary>
public string RoleCode { get; set; }
/// <summary>
/// 角色名称
/// </summary>
public string RoleName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
}
/// <summary>
/// 验证
/// </summary>
public class RoleInputValidator : AbstractValidator<RoleInput>
{
/// <summary>
/// 构造函数
/// </summary>
public RoleInputValidator()
{
this.RuleFor(o => o.RoleName)
.NotEmpty().WithName("角色名称");
this.RuleFor(o => o.RoleCode)
.NotEmpty().WithName("角色唯一编码");
}
}