Skip to main content
Glama
nesirat

MCP Vulnerability Management System

by nesirat
notification.py1.46 kB
from sqlalchemy import Column, Integer, String, Boolean, JSON, ForeignKey, DateTime from sqlalchemy.orm import relationship from app.db.base_class import Base from datetime import datetime class NotificationConfig(Base): __tablename__ = "notification_configs" id = Column(Integer, primary_key=True, index=True) user_id = Column(Integer, ForeignKey("users.id"), nullable=False) name = Column(String, nullable=False) type = Column(String, nullable=False) # email, webhook, slack, teams enabled = Column(Boolean, default=True) config = Column(JSON, nullable=False) # Configuration specific to notification type created_at = Column(DateTime, default=datetime.utcnow) updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow) # Relationships user = relationship("User", back_populates="notification_configs") class NotificationLog(Base): __tablename__ = "notification_logs" id = Column(Integer, primary_key=True, index=True) notification_config_id = Column(Integer, ForeignKey("notification_configs.id"), nullable=False) alert_id = Column(Integer, ForeignKey("alerts.id"), nullable=False) status = Column(String, nullable=False) # success, failed error_message = Column(String, nullable=True) created_at = Column(DateTime, default=datetime.utcnow) # Relationships notification_config = relationship("NotificationConfig") alert = relationship("Alert")

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nesirat/MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server