add ModuleType Schema

This commit is contained in:
jxxghp
2024-10-12 11:50:00 +08:00
parent fcfeeb09d3
commit 603ab97665
27 changed files with 248 additions and 148 deletions
+8
View File
@@ -8,6 +8,7 @@ from app.log import logger
from app.modules import _ModuleBase, _MessageBase
from app.modules.slack.slack import Slack
from app.schemas import MessageChannel, CommingMessage, Notification
from app.schemas.types import ModuleType
class SlackModule(_ModuleBase, _MessageBase[Slack]):
@@ -23,6 +24,13 @@ class SlackModule(_ModuleBase, _MessageBase[Slack]):
def get_name() -> str:
return "Slack"
@staticmethod
def get_type() -> ModuleType:
"""
获取模块类型
"""
return ModuleType.Notification
def stop(self):
"""
停止模块