dify/api/models/enums.py
QuantumGhost 6a9e0b1005
feat(api): Introduce WorkflowDraftVariable Model (#19737)
- 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`.
2025-05-19 22:59:56 +08:00

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"