feat:支持文件整理存储操作事件

This commit is contained in:
jxxghp
2025-05-01 21:16:21 +08:00
parent ca1f3ac377
commit 741badf9e6
5 changed files with 63 additions and 4 deletions
+19 -1
View File
@@ -1,5 +1,5 @@
from pathlib import Path
from typing import Optional, Dict, Any, List, Set
from typing import Optional, Dict, Any, List, Set, Callable
from pydantic import BaseModel, Field, root_validator
@@ -307,3 +307,21 @@ class MediaRecognizeConvertEventData(ChainEventData):
# 输出参数
media_dict: dict = Field(default=dict, description="转换后的媒体信息(TheMovieDb/豆瓣)")
class StorageOperSelectionEventData(ChainEventData):
"""
StorageOperSelect 事件的数据模型
Attributes:
# 输入参数
storage_name (str): 存储名称
# 输出参数
storage_oper (Callable): 存储操作对象
"""
# 输入参数
storage_name: str = Field(..., description="存储名称")
# 输出参数
storage_oper: Optional[Callable] = Field(default=None, description="存储操作对象")
+2
View File
@@ -89,6 +89,8 @@ class ChainEventType(Enum):
RecommendSource = "recommend.source"
# 工作流执行
WorkflowExecution = "workflow.execution"
# 存储操作选择
StorageOperSelection = "storage.operation"
# 系统配置Key字典