using DS.Module.Core;
using FluentValidation;
namespace DS.WMS.Core.Sys.Dtos;
///
/// 字典值请求实体
///
public class DictDataReq
{
///
/// 主键Id
///
public long Id { get; set; }
///
/// 字典类型Id
///
public long TypeId { get; set; }
///
/// 字典名称
///
public string Name { get; set; }
///
/// 字典值
///
public string Value { get; set; }
///
/// 字典名称(英文)
///
public string EnName { get; set; }
///
/// 拓展字段
///
public string ExpandValue { get; set; }
///
/// 排序
///
public int? OrderNo { get; set; } = 100;
///
/// 状态 0 启用 1 禁用
///
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
///
/// 备注
///
public string Note { get; set; } = "";
}
///
/// 验证
///
public class DictDataReqValidator : AbstractValidator
{
///
/// 构造函数
///
public DictDataReqValidator()
{
this.RuleFor(o => o.Value)
.NotEmpty().WithName("字典值");
this.RuleFor(o => o.Name)
.NotEmpty().WithName("字典值名称");
}
}