TT-003: complete request-module integration into modular platform
- integrated request-module into module registry - moved backend into modules/request-module - added manifest.json and module.py - implemented dynamic router mounting - implemented dynamic static mounting - removed direct dependencies from platform core - verified startup with request-module - verified startup without request-module - added implementation_report_003.md
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
"""Notification model."""
|
||||
|
||||
from sqlalchemy import Column, String, Text, DateTime, ForeignKey, Integer
|
||||
from sqlalchemy.orm import relationship
|
||||
from request_app.models.base import Base, TimestampMixin
|
||||
|
||||
|
||||
class Notification(Base, TimestampMixin):
|
||||
"""Notification model."""
|
||||
|
||||
__tablename__ = "notifications"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
user_id = Column(Integer, ForeignKey("users.id", ondelete="CASCADE"), nullable=False)
|
||||
ticket_id = Column(Integer, ForeignKey("tickets.id", ondelete="CASCADE"))
|
||||
type = Column(String(50), nullable=False) # email, sms, in_app
|
||||
title = Column(String(255), nullable=False)
|
||||
message = Column(Text, nullable=False)
|
||||
is_read = Column(Integer, default=0) # 0=False, 1=True
|
||||
is_delivered = Column(Integer, default=0) # 0=False, 1=True
|
||||
sent_at = Column(DateTime)
|
||||
|
||||
# Relationships
|
||||
user = relationship("User")
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"<Notification(id={self.id}, user_id={self.user_id})>"
|
||||
Reference in New Issue
Block a user