All checks were successful
continuous-integration/drone/push Build is passing
- NotificationChannel -> TaskNotifyChannel - platform_notification_channels -> platform_task_notify_channels
21 lines
858 B
Python
21 lines
858 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)
|
|
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)
|