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#
9 months ago
|
using System.ComponentModel.DataAnnotations;
|
||
|
using DS.Module.Core;
|
||
|
using FluentValidation;
|
||
|
|
||
6 months ago
|
namespace DS.WMS.Core.Sys.Dtos;
|
||
9 months ago
|
|
||
|
/// <summary>
|
||
|
/// 系统参数请求实体
|
||
|
/// </summary>
|
||
|
public class ConfigReq
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 主键Id
|
||
|
/// </summary>
|
||
|
public long Id { get; set; }
|
||
|
/// <summary>
|
||
|
/// 名称
|
||
|
/// </summary>
|
||
|
[Required, MaxLength(100)]
|
||
|
public string Name { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 编码
|
||
|
/// </summary>
|
||
|
[Required, MaxLength(100)]
|
||
|
public string Code { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 属性值
|
||
|
/// </summary>
|
||
|
public string Value { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 常量所属分类的编码,来自于“常量的分类”字典
|
||
|
/// </summary>
|
||
|
public string GroupCode { get; set; }
|
||
|
/// <summary>
|
||
|
/// 是否系统参数 0否 1是
|
||
|
/// </summary>
|
||
|
public bool IsSysFlag { get; set; } = false;
|
||
|
/// <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 ConfigReqValidator : AbstractValidator<ConfigReq>
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 构造函数
|
||
|
/// </summary>
|
||
|
public ConfigReqValidator()
|
||
|
{
|
||
|
// this.RuleFor(o => o.PermissionId)
|
||
|
// .NotEmpty().WithName("权限模块Id");
|
||
|
// this.RuleFor(o => o.ColumnView)
|
||
|
// .NotEmpty().WithName("中文视图名");
|
||
|
}
|
||
|
}
|