-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/workflow-backend' into deploy/dev
- Loading branch information
Showing
4 changed files
with
614 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from typing import Literal, Optional | ||
|
||
from pydantic import BaseModel | ||
|
||
from core.workflow.entities.base_node_data_entities import BaseNodeData | ||
|
||
|
||
class IfElseNodeData(BaseNodeData): | ||
""" | ||
Answer Node Data. | ||
""" | ||
class Condition(BaseModel): | ||
""" | ||
Condition entity | ||
""" | ||
variable_selector: list[str] | ||
comparison_operator: Literal[ | ||
# for string or array | ||
"contains", "not contains", "start with", "end with", "is", "is not", "empty", "not empty", | ||
# for number | ||
"=", "≠", ">", "<", "≥", "≤", "null", "not null" | ||
] | ||
value: Optional[str] = None | ||
|
||
logical_operator: Literal["and", "or"] = "and" | ||
conditions: list[Condition] |
Oops, something went wrong.