Add db table and models

This commit is contained in:
Jason Zimdars
2025-07-14 19:57:30 -05:00
parent 2e7a7384ab
commit e59a994a0c
12 changed files with 327 additions and 25 deletions
+7
View File
@@ -0,0 +1,7 @@
class Push::Subscription < ApplicationRecord
belongs_to :user
def notification(**params)
WebPush::Notification.new(**params, badge: user.notifications.unread.count, endpoint: endpoint, p256dh_key: p256dh_key, auth_key: auth_key)
end
end