using System.ComponentModel.DataAnnotations;
using DS.Module.Core;
using FluentValidation;
namespace DS.WMS.Core.Code.Dtos;
///
/// 业务参数请求实体
///
public class CodeConfigReq
{
///
/// 主键Id
///
public long Id { get; set; }
///
/// 名称
///
[Required, MaxLength(100)]
public string Name { get; set; }
///
/// 编码
///
[Required, MaxLength(100)]
public string Code { get; set; }
///
/// 属性值
///
public string Value { get; set; }
///
/// 常量所属分类的编码,来自于“常量的分类”字典
///
public string GroupCode { get; set; }
///
/// 排序
///
public int? OrderNo { get; set; } = 100;
///
/// 状态 0 启用 1 禁用
///
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
///
/// 备注
///
public string Note { get; set; } = "";
}
///
/// 验证
///
public class CodeConfigReqValidator : AbstractValidator
{
///
/// 构造函数
///
public CodeConfigReqValidator()
{
// this.RuleFor(o => o.PermissionId)
// .NotEmpty().WithName("权限模块Id");
// this.RuleFor(o => o.ColumnView)
// .NotEmpty().WithName("中文视图名");
}
}