feat(workflow): domain model for workflow node execution (#19430)

Signed-off-by: -LAN- <laipz8200@outlook.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
-LAN-
2025-05-17 00:56:16 +08:00
committed by GitHub
parent aeceb200ec
commit 4977bb21ec
31 changed files with 1108 additions and 483 deletions

View File

@@ -29,7 +29,7 @@ from libs.helper import generate_string
from .account import Account, Tenant
from .base import Base
from .engine import db
from .enums import CreatedByRole
from .enums import CreatorUserRole
from .types import StringUUID
from .workflow import WorkflowRunStatus
@@ -1270,7 +1270,7 @@ class MessageFile(Base):
url: str | None = None,
belongs_to: Literal["user", "assistant"] | None = None,
upload_file_id: str | None = None,
created_by_role: CreatedByRole,
created_by_role: CreatorUserRole,
created_by: str,
):
self.message_id = message_id
@@ -1417,7 +1417,7 @@ class EndUser(Base, UserMixin):
)
id = db.Column(StringUUID, server_default=db.text("uuid_generate_v4()"))
tenant_id = db.Column(StringUUID, nullable=False)
tenant_id: Mapped[str] = db.Column(StringUUID, nullable=False)
app_id = db.Column(StringUUID, nullable=True)
type = db.Column(db.String(255), nullable=False)
external_user_id = db.Column(db.String(255), nullable=True)
@@ -1547,7 +1547,7 @@ class UploadFile(Base):
size: int,
extension: str,
mime_type: str,
created_by_role: CreatedByRole,
created_by_role: CreatorUserRole,
created_by: str,
created_at: datetime,
used: bool,