rule_chain.go 810 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package ruleEngine
  2. type EntityType int
  3. const (
  4. ruleChan EntityType = iota
  5. )
  6. // RuleChain 规则链对象
  7. type RuleChain struct {
  8. TenantId string
  9. Name string
  10. FirstNodeId string
  11. IsRoot bool
  12. IsDebug bool
  13. Config string
  14. ChainId string
  15. }
  16. // RuleNode 规则节点对象,代表规则链中的一个组成节点
  17. type RuleNode struct {
  18. RuleChainId string
  19. Type string
  20. Name string
  21. IsDebug bool
  22. Config string
  23. RuleNodeId string
  24. }
  25. // Relation 节点关系
  26. // 用于描述节点之间的关系
  27. type Relation struct {
  28. From string
  29. To string
  30. Type string
  31. AdditionalInfo string
  32. RelationTypeGroup RelationTypeGroup
  33. }
  34. type RelationTypeGroup int
  35. const (
  36. COMMON RelationTypeGroup = iota
  37. RULE_CHAIN
  38. RULE_NODE
  39. )