summaryrefslogtreecommitdiff
path: root/app/backend
diff options
context:
space:
mode:
Diffstat (limited to 'app/backend')
-rw-r--r--app/backend/rcal/model.py21
1 files changed, 19 insertions, 2 deletions
diff --git a/app/backend/rcal/model.py b/app/backend/rcal/model.py
index 4e2644e..61f0047 100644
--- a/app/backend/rcal/model.py
+++ b/app/backend/rcal/model.py
@@ -3,7 +3,7 @@ from sqlalchemy import Column, ForeignKey, Table
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
from sqlalchemy.types import (TIMESTAMP, Boolean, DateTime, Integer, String,
- TypeDecorator)
+ Text, TypeDecorator)
from sqlalchemy_utils import types
@@ -181,4 +181,21 @@ class UserAuthKey(BASE):
order_by='UserAuthKey.id')
-__all__ = ('Calendar', 'Entry', 'Category', 'User', 'UserAuthKey')
+
+class MailQueue(BASE):
+ __tablename__ = 'mail_queue'
+
+ id = Column(Integer, primary_key=True)
+ subject = Column(String(255))
+ html_body = Column(Text)
+ text_body = Column(Text)
+ recipient_name = Column(String(255))
+ recipient_mail = Column(String(255))
+ is_sent = Column(Boolean, nullable=False,
+ default=False, server_default='0', index=True)
+ send_attempts = Column(Integer, nullable=False,
+ default=0, server_default='0', index=True)
+ create_time = Column(UTCDateTime, index=True)
+ last_attempt_time = Column(UTCDateTime, index=True)
+
+__all__ = ('Calendar', 'Entry', 'Category', 'User', 'UserAuthKey', 'MailQueue')