You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
72 lines
1.6 KiB
C#
72 lines
1.6 KiB
C#
using DS.Module.Core;
|
|
using FluentValidation;
|
|
using SqlSugar;
|
|
|
|
namespace DS.WMS.Core.Code.Dtos;
|
|
|
|
/// <summary>
|
|
/// 租户查询条件设置请求实体
|
|
/// </summary>
|
|
public class CodeQuerySetReq
|
|
{
|
|
/// <summary>
|
|
/// 主键Id
|
|
/// </summary>
|
|
public long Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// 权限Id
|
|
/// </summary>
|
|
public long? PermissionId { get; set; }
|
|
/// <summary>
|
|
/// 标识序号
|
|
/// </summary>
|
|
public int TagNo { get; set; } = 0;
|
|
/// <summary>
|
|
/// 权限模块名称
|
|
/// </summary>
|
|
public string PermissionName { get; set; }
|
|
/// <summary>
|
|
/// 模板名称
|
|
/// </summary>
|
|
public string TemplateName { get; set; }
|
|
|
|
/// <summary>
|
|
/// 表单设置
|
|
/// </summary>
|
|
public string Content { get; set; }
|
|
|
|
/// <summary>
|
|
/// 排序
|
|
/// </summary>
|
|
public int? OrderNo { get; set; } = 100;
|
|
|
|
/// <summary>
|
|
/// 状态 0 启用 1 禁用
|
|
/// </summary>
|
|
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
|
/// <summary>
|
|
/// 备注
|
|
/// </summary>
|
|
public string Note { get; set; } = "";
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 验证
|
|
/// </summary>
|
|
public class QuerySetReqValidator : AbstractValidator<CodeQuerySetReq>
|
|
{
|
|
/// <summary>
|
|
/// 构造函数
|
|
/// </summary>
|
|
public QuerySetReqValidator()
|
|
{
|
|
this.RuleFor(o => o.PermissionId)
|
|
.NotEmpty().WithName("权限模块Id");
|
|
this.RuleFor(o => o.TemplateName)
|
|
.NotEmpty().WithName("模板名称");
|
|
this.RuleFor(o => o.Content)
|
|
.NotEmpty().WithName("表单设置");
|
|
}
|
|
} |