using System.ComponentModel.DataAnnotations; using DS.Module.Core; using FluentValidation; namespace DS.WMS.Core.Sys.Dtos; /// /// 版本信息请求实体 /// public class VersionReq { /// /// 主键Id /// public long Id { get; set; } /// /// 版本号 /// [Required, MaxLength(100)] public string Version { get; set; } /// /// 标题 /// [Required, MaxLength(100)] public string Title { get; set; } /// /// 主库更新内容 /// public string MainContent { get; set; } /// /// 租户库更新内容 /// public string TenantContent { get; set; } /// /// 排序 /// public int? OrderNo { get; set; } = 100; /// /// 状态 0 启用 1 禁用 /// public StatusEnum? Status { get; set; } = StatusEnum.Enable; /// /// 备注 /// public string Note { get; set; } = ""; } /// /// 验证 /// public class VersionReqValidator : AbstractValidator { /// /// 构造函数 /// public VersionReqValidator() { // this.RuleFor(o => o.PermissionId) // .NotEmpty().WithName("权限模块Id"); // this.RuleFor(o => o.ColumnView) // .NotEmpty().WithName("中文视图名"); } }