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,30 @@
|
||||
"""Email outbox model for send queue."""
|
||||
|
||||
from sqlalchemy import Column, Integer, String, Text, DateTime, Boolean
|
||||
from datetime import datetime
|
||||
from request_app.models.base import Base, TimestampMixin
|
||||
|
||||
|
||||
class EmailOutbox(Base, TimestampMixin):
|
||||
"""Queued emails waiting to be sent."""
|
||||
|
||||
__tablename__ = "email_outbox"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
ticket_id = Column(Integer, nullable=True)
|
||||
user_id = Column(Integer, nullable=True)
|
||||
|
||||
to_addresses = Column(Text, nullable=False)
|
||||
cc_addresses = Column(Text)
|
||||
subject = Column(String(4000))
|
||||
body_text = Column(Text)
|
||||
body_html = Column(Text)
|
||||
|
||||
status = Column(String(20), default="pending") # pending, sending, sent, failed
|
||||
retries = Column(Integer, default=0)
|
||||
max_retries = Column(Integer, default=5)
|
||||
last_error = Column(Text)
|
||||
sent_at = Column(DateTime)
|
||||
|
||||
def __repr__(self):
|
||||
return f"<EmailOutbox(id={self.id}, status='{self.status}', to='{self.to_addresses}')>"
|
||||
Reference in New Issue
Block a user