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