using DS.Module.Core;
using FluentValidation;
namespace DS.WMS.Core.Code.Dtos;
///
/// 租户查询条件设置请求实体
///
public class CodeQuerySetReq
{
///
/// 主键Id
///
public long Id { get; set; }
///
/// 权限Id
///
public long? PermissionId { get; set; }
///
/// 权限模块名称
///
public string PermissionName { get; set; }
///
/// 模板名称
///
public string TemplateName { get; set; }
///
/// 表单设置
///
public string Content { get; set; }
///
/// 排序
///
public int? OrderNo { get; set; } = 100;
///
/// 状态 0 启用 1 禁用
///
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
///
/// 备注
///
public string Note { get; set; } = "";
}
///
/// 验证
///
public class QuerySetReqValidator : AbstractValidator
{
///
/// 构造函数
///
public QuerySetReqValidator()
{
this.RuleFor(o => o.PermissionId)
.NotEmpty().WithName("权限模块Id");
this.RuleFor(o => o.TemplateName)
.NotEmpty().WithName("模板名称");
this.RuleFor(o => o.Content)
.NotEmpty().WithName("表单设置");
}
}