"""通知模板模型。""" from sqlalchemy import Column, Integer, String, Text, Boolean, DateTime, func from app.core.database import Base class NotificationTemplate(Base): """通知消息模板。""" __tablename__ = "notification_templates" id = Column(Integer, primary_key=True, autoincrement=True) name = Column(String(100), nullable=False) event_type = Column(String(50), nullable=False) channel_type = Column(String(30), nullable=False) # dingtalk / feishu / email title_template = Column(Text, nullable=False) body_template = Column(Text, nullable=False) is_enabled = Column(Boolean, default=True) created_at = Column(DateTime, server_default=func.now())