新版本流程编辑器

This commit is contained in:
mlogclub
2026-07-27 19:04:15 +08:00
parent d33960961a
commit e072141953
281 changed files with 25145 additions and 3405 deletions
+16 -4
View File
@@ -5,10 +5,11 @@ import "encoding/json"
const SchemaVersion = 2
type Definition struct {
SchemaVersion int `json:"schemaVersion"`
Nodes []Node `json:"nodes"`
Annotations []Node `json:"annotations,omitempty"`
Edges []Edge `json:"edges"`
SchemaVersion int `json:"schemaVersion,omitempty"`
Nodes []Node `json:"nodes"`
Annotations []Node `json:"annotations,omitempty"`
Edges []Edge `json:"edges"`
GlobalVariable json.RawMessage `json:"globalVariable,omitempty"`
}
type Node struct {
@@ -79,6 +80,17 @@ type Condition struct {
Right any `json:"right,omitempty"`
}
type FlowGramConditionItem struct {
Key string `json:"key"`
Value FlowGramCondition `json:"value"`
}
type FlowGramCondition struct {
Left Value `json:"left"`
Operator string `json:"operator"`
Right Value `json:"right"`
}
func RefValue(nodeID string, field string) Value {
return Value{Type: ValueTypeRef, Content: []string{nodeID, field}}
}