mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-05-24 05:28:43 +08:00

- Introduce `WorkflowDraftVariable` model and the corresponding migration. - Implement `EnumText`, a custom column type for SQLAlchemy designed to work seamlessly with enumeration classes based on `StrEnum`.
24 lines
431 B
Python
24 lines
431 B
Python
from enum import StrEnum
|
|
|
|
|
|
class CreatorUserRole(StrEnum):
|
|
ACCOUNT = "account"
|
|
END_USER = "end_user"
|
|
|
|
|
|
class UserFrom(StrEnum):
|
|
ACCOUNT = "account"
|
|
END_USER = "end-user"
|
|
|
|
|
|
class WorkflowRunTriggeredFrom(StrEnum):
|
|
DEBUGGING = "debugging"
|
|
APP_RUN = "app-run"
|
|
|
|
|
|
class DraftVariableType(StrEnum):
|
|
# node means that the correspond variable
|
|
NODE = "node"
|
|
SYS = "sys"
|
|
CONVERSATION = "conversation"
|