- P0: 实例访问控制全线接入权限组 (829测试) - P1: permissions字段激活 + 操作级权限检查 (843测试) - 前端: 删除数据权限页面, 权限组合并为唯一入口 - 新增: CodeMirror编辑器 + 查询模板 + 慢查询分析 - 新增: MongoDB管理页面 + Dashboard增强 - 修复: Pydantic V2迁移 + 前端TS错误修复
19 lines
708 B
Python
19 lines
708 B
Python
"""通知模板模型。"""
|
|
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())
|