using DS.Module.Core; using FluentValidation; namespace DS.WMS.Core.Sys.Dtos; /// /// 操作权限请求实体 /// public class OperationRuleReq { /// /// 主键Id /// public long Id { get; set; } /// /// 资源标识(权限ID) /// public long PermissionId { get; set; } /// /// 权限规则 /// public string DataRules { get; set; } /// /// 权限实体 /// public string PermissionEntity { get; set; } /// /// 中文视图名 /// public string ColumnView { 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 OperationRuleReqValidator : AbstractValidator { /// /// 构造函数 /// public OperationRuleReqValidator() { this.RuleFor(o => o.PermissionId) .NotEmpty().WithName("权限模块Id"); } }