05/15 Update: implement iPad notification function 2

This commit is contained in:
Nguyen Ngo
2026-05-15 15:15:10 -04:00
parent b761f6577e
commit b69a52e5f5
5 changed files with 162 additions and 13 deletions
+4
View File
@@ -53,6 +53,10 @@ class Notification(db.Model):
issue_id = db.Column(db.Integer, db.ForeignKey('issues.id', ondelete='CASCADE'), nullable=True)
inspection_id = db.Column(db.Integer, db.ForeignKey('inspections.id', ondelete='CASCADE'), nullable=True)
# Event type — stored for mobile API polling so the iPad can categorise alerts.
# Added phase17; NULL for notifications created before the migration.
event_type = db.Column(db.String(50), nullable=True)
# Digest tracking: set to True when created, cleared after digest email sent
digest_pending = db.Column(db.Boolean, default=False, nullable=False, index=True)