from sqlalchemy import Column, Integer, String, Text, Boolean, DateTime, func from app.core.database import Base class NotificationChannel(Base): __tablename__ = "notification_channels" id = Column(Integer, primary_key=True, autoincrement=True) name = Column(String(100), nullable=False) channel_type = Column(String(30), nullable=False) # dingtalk / webhook_feishu / email config = Column(Text, nullable=False) # JSON string is_enabled = Column(Boolean, default=True) created_at = Column(DateTime, server_default=func.now()) updated_at = Column(DateTime, server_default=func.now(), onupdate=func.now())