All checks were successful
continuous-integration/drone/push Build is passing
- 新增 platform_notification_channels 表管理通知渠道(钉钉/企微机器人)
- 新增通知渠道管理页面,支持创建、编辑、测试、删除
- 定时任务增加通知渠道选择和企微应用选择
- 脚本执行支持返回值(result变量),自动发送到配置的渠道
- 调度器执行脚本后根据配置自动发送通知
使用方式:
1. 在「通知渠道」页面为租户配置钉钉/企微机器人
2. 创建定时任务时选择通知渠道
3. 脚本中设置 result = {'content': '内容', 'title': '标题'}
4. 任务执行后自动发送到配置的渠道
36 lines
913 B
Python
36 lines
913 B
Python
"""数据模型"""
|
|
from .tenant import Tenant, Subscription, Config
|
|
from .tenant_app import TenantApp
|
|
from .tenant_wechat_app import TenantWechatApp
|
|
from .tool_config import ToolConfig
|
|
from .app import App
|
|
from .stats import AICallEvent, TenantUsageDaily
|
|
from .logs import PlatformLog
|
|
from .alert import AlertRule, AlertRecord, NotificationChannel
|
|
from .pricing import ModelPricing, TenantBilling
|
|
from .scheduled_task import ScheduledTask, TaskLog, ScriptVar, Secret
|
|
from .notification_channel import NotificationChannel
|
|
|
|
__all__ = [
|
|
"Tenant",
|
|
"Subscription",
|
|
"Config",
|
|
"TenantApp",
|
|
"TenantWechatApp",
|
|
"ToolConfig",
|
|
"App",
|
|
"AICallEvent",
|
|
"TenantUsageDaily",
|
|
"PlatformLog",
|
|
"AlertRule",
|
|
"AlertRecord",
|
|
"NotificationChannel",
|
|
"ModelPricing",
|
|
"TenantBilling",
|
|
"ScheduledTask",
|
|
"TaskLog",
|
|
"ScriptVar",
|
|
"Secret",
|
|
"NotificationChannel"
|
|
]
|