using System.ComponentModel.DataAnnotations; using DS.Module.Core; using FluentValidation; namespace DS.WMS.Core.System.Dtos; /// /// 系统参数请求实体 /// public class ConfigReq { /// /// 主键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; } /// /// 是否系统参数 0否 1是 /// public bool IsSysFlag { get; set; } = false; /// /// 排序 /// public int? OrderNo { get; set; } = 100; /// /// 状态 0 启用 1 禁用 /// public StatusEnum? Status { get; set; } = StatusEnum.Enable; /// /// 备注 /// public string Note { get; set; } = ""; } /// /// 验证 /// public class ConfigReqValidator : AbstractValidator { /// /// 构造函数 /// public ConfigReqValidator() { // this.RuleFor(o => o.PermissionId) // .NotEmpty().WithName("权限模块Id"); // this.RuleFor(o => o.ColumnView) // .NotEmpty().WithName("中文视图名"); } }