You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
984 B
42 lines
984 B
3 months ago
|
using FluentValidation;
|
||
|
using Kean.Domain.Order.Models;
|
||
|
using System.Collections.Generic;
|
||
|
|
||
|
namespace Kean.Domain.Order.Commands
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 创建工作流命令
|
||
|
/// </summary>
|
||
|
public class CreateFlowCommand : CommandValidator<CreateFlowCommand>, ICommand
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 描述
|
||
|
/// </summary>
|
||
|
public string Name { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 节点
|
||
|
/// </summary>
|
||
|
public IEnumerable<FlowNode> Nodes { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 路径
|
||
|
/// </summary>
|
||
|
public IEnumerable<FlowPath> Paths { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 验证项
|
||
|
/// </summary>
|
||
|
protected override void Validation()
|
||
|
{
|
||
|
RuleFor(r => r.Name).NotEmpty().WithMessage("描述不允许空");
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 标识
|
||
|
/// </summary>
|
||
|
[Output]
|
||
|
public int Id { get; private set; }
|
||
|
}
|
||
|
}
|