All checks were successful
continuous-integration/drone/push Build is passing
- 通知渠道增加 sign_secret 字段存储加签密钥 - 发送钉钉消息时自动计算签名 - 前端增加加签密钥输入框(仅钉钉机器人显示)
22 lines
919 B
Python
22 lines
919 B
Python
"""任务通知渠道模型"""
|
|
from datetime import datetime
|
|
from sqlalchemy import Column, Integer, String, Enum, Boolean, DateTime
|
|
from ..database import Base
|
|
|
|
|
|
class TaskNotifyChannel(Base):
|
|
"""任务通知渠道表(用于定时任务推送)"""
|
|
__tablename__ = "platform_task_notify_channels"
|
|
|
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
|
tenant_id = Column(String(50), nullable=False)
|
|
channel_name = Column(String(100), nullable=False)
|
|
channel_type = Column(Enum('dingtalk_bot', 'wecom_bot'), nullable=False)
|
|
webhook_url = Column(String(500), nullable=False)
|
|
sign_secret = Column(String(200)) # 钉钉加签密钥
|
|
description = Column(String(255))
|
|
is_enabled = Column(Boolean, default=True)
|
|
|
|
created_at = Column(DateTime, default=datetime.now)
|
|
updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now)
|