using DS.Module.Core;
using FluentValidation;
namespace DS.WMS.Core.Sys.Dtos;
///
/// 数据权限请求实体
///
public class DataRuleReq
{
///
/// 主键Id
///
public long Id { get; set; }
///
/// 资源标识(权限ID)
///
public long PermissionId { get; set; }
///
/// 中文视图名
///
public string ColumnView { get; set; }
///
/// 权限规则
///
public string DataRules { get; set; }
///
/// 权限实体
///
public string PermissionEntity { get; set; }
///
/// 数据权限描述
///
public string Description { get; set; }
///
/// 排序
///
public int? OrderNo { get; set; } = 100;
///
/// 状态 0 启用 1 禁用
///
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
///
/// 备注
///
public string Note { get; set; } = "";
}
///
/// 验证
///
public class DataRuleReqValidator : AbstractValidator
{
///
/// 构造函数
///
public DataRuleReqValidator()
{
this.RuleFor(o => o.PermissionId)
.NotEmpty().WithName("权限模块Id");
this.RuleFor(o => o.ColumnView)
.NotEmpty().WithName("中文视图名");
}
}