using DS.Module.Core; using FluentValidation; namespace DS.WMS.Core.Code.Dtos; /// /// 租户表单设置请求实体 /// public class CodeFormSetReq { /// /// 主键Id /// public long Id { get; set; } /// /// 权限Id /// public long? PermissionId { get; set; } /// /// 权限模块名称 /// public string PermissionName { get; set; } /// /// 模板名称 /// public string TemplateName { get; set; } ///// ///// 中文视图名 ///// //public string ColumnView { get; set; } /// /// 表单序号 /// public int FormNo { get; set; } = 0; /// /// 表单设置 /// public string Content { get; set; } /// /// 排序 /// public int? OrderNo { get; set; } = 100; /// /// 状态 0 启用 1 禁用 /// public StatusEnum? Status { get; set; } = StatusEnum.Enable; /// /// 备注 /// public string Note { get; set; } = ""; } /// /// 验证 /// public class FormSetReqValidator : AbstractValidator { /// /// 构造函数 /// public FormSetReqValidator() { this.RuleFor(o => o.PermissionId) .NotEmpty().WithName("权限模块Id"); this.RuleFor(o => o.TemplateName) .NotEmpty().WithName("模板名称"); this.RuleFor(o => o.Content) .NotEmpty().WithName("表单设置"); } }