mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-22 08:21:13 -05:00
New table to hold scheduled_notifications.
This commit is contained in:
@@ -912,6 +912,16 @@ class NotificationHistory(db.Model, HistoryModel):
|
||||
INVITED_USER_STATUS_TYPES = ['pending', 'accepted', 'cancelled']
|
||||
|
||||
|
||||
class ScheduledNotification(db.Model):
|
||||
__tablename__ = 'scheduled_notifications'
|
||||
|
||||
id = db.Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4())
|
||||
notification_id = db.Column(UUID(as_uuid=True), db.ForeignKey('notifications.id'), index=True, nullable=False)
|
||||
notification = db.relationship('Notification')
|
||||
scheduled_for = db.Column(db.DateTime, index=False, nullable=False)
|
||||
pending = db.Column(db.Boolean, nullable=False, default=False)
|
||||
|
||||
|
||||
class InvitedUser(db.Model):
|
||||
__tablename__ = 'invited_users'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user