mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-03-20 12:08:09 +08:00
26 lines
508 B
Python
26 lines
508 B
Python
from abc import ABC, abstractmethod
|
|
|
|
from pydantic.main import BaseModel
|
|
|
|
from app.schemas import ActionContext, ActionParams
|
|
|
|
|
|
class BaseAction(BaseModel, ABC):
|
|
"""
|
|
工作流动作基类
|
|
"""
|
|
|
|
@property
|
|
@abstractmethod
|
|
def name(self) -> str:
|
|
pass
|
|
|
|
@property
|
|
@abstractmethod
|
|
def description(self) -> str:
|
|
pass
|
|
|
|
@abstractmethod
|
|
async def execute(self, params: ActionParams, context: ActionContext) -> ActionContext:
|
|
raise NotImplementedError
|