using DS.Module.Core; using FluentValidation; namespace DS.WMS.Core.Flow.Dtos; /// /// 流程模板请求实体 /// public class FlowTemplateReq { /// /// 主键Id /// public long Id { get; set; } /// /// 模板名称 /// public string Name { get; set; } /// /// 模块Id /// public long PermissionId { get; set; } /// ///中文视图名;设计打印方案时,提供中文快捷按钮的视图来源 /// public string ColumnView { get; set; } /// /// 流程内容 /// public string Content { get; set; } /// /// 排序 /// public int? OrderNo { get; set; } = 100; /// /// 状态 0 启用 1 禁用 /// public StatusEnum Status { get; set; } = StatusEnum.Enable; /// /// 执行人变更回调地址 /// public string? MarkerNotifyURL { get; set; } /// /// 回调地址 /// public string? CallbackURL { get; set; } /// /// 审批类型 /// public AuditType? AuditType { get; set; } /// /// 备注 /// public string? Note { get; set; } } /// /// 验证 /// public class FlowTemplateReqValidator : AbstractValidator { /// /// 构造函数 /// public FlowTemplateReqValidator() { this.RuleFor(o => o.Name) .NotEmpty().WithMessage("模板名称"); this.RuleFor(o => o.PermissionId) .NotEmpty().WithMessage("关联模块"); } }