# frozen_string_literal: true # == Schema Information # # Table name: unread_notifications # # id :integer not null, primary key # notification_id :integer not null # user_id :integer not null # # Indexes # # index_unread_notifications_on_notification_id_and_user_id (notification_id,user_id) UNIQUE # index_unread_notifications_on_user_id (user_id) # # Foreign Keys # # fk_rails_... (notification_id => notifications.id) ON DELETE => cascade ON UPDATE => cascade # fk_rails_... (user_id => users.id) ON DELETE => cascade ON UPDATE => cascade # class UnreadNotification < ApplicationRecord belongs_to :notification, optional: true belongs_to :user, optional: true end