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.
69 lines
1.4 KiB
C#
69 lines
1.4 KiB
C#
10 months ago
|
using DS.Module.Core;
|
||
|
using FluentValidation;
|
||
|
|
||
7 months ago
|
namespace DS.WMS.Core.Sys.Dtos;
|
||
10 months ago
|
|
||
|
/// <summary>
|
||
|
/// 字典值请求实体
|
||
|
/// </summary>
|
||
|
public class DictDataReq
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 主键Id
|
||
|
/// </summary>
|
||
|
public long Id { get; set; }
|
||
|
/// <summary>
|
||
|
/// 字典类型Id
|
||
|
/// </summary>
|
||
|
public long TypeId { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
9 months ago
|
/// 字典名称
|
||
10 months ago
|
/// </summary>
|
||
9 months ago
|
public string Name { get; set; }
|
||
10 months ago
|
|
||
|
/// <summary>
|
||
|
/// 字典值
|
||
|
/// </summary>
|
||
|
public string Value { get; set; }
|
||
9 months ago
|
|
||
|
/// <summary>
|
||
|
/// 字典名称(英文)
|
||
|
/// </summary>
|
||
|
public string EnName { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 拓展字段
|
||
|
/// </summary>
|
||
|
public string ExpandValue { get; set; }
|
||
10 months ago
|
/// <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 DictDataReqValidator : AbstractValidator<DictDataReq>
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 构造函数
|
||
|
/// </summary>
|
||
|
public DictDataReqValidator()
|
||
|
{
|
||
|
this.RuleFor(o => o.Value)
|
||
|
.NotEmpty().WithName("字典值");
|
||
9 months ago
|
this.RuleFor(o => o.Name)
|
||
|
.NotEmpty().WithName("字典值名称");
|
||
10 months ago
|
}
|
||
|
}
|