using FluentValidation;
namespace DS.WMS.Core.Sys.Dtos;
///
///
///
public class RoleInput
{
///
///
///
public long 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("角色唯一编码");
}
}