scinote-web/app/models/notification.rb
2016-09-29 14:49:58 +02:00

8 lines
264 B
Ruby

class Notification < ActiveRecord::Base
has_many :user_notifications, inverse_of: :notification
has_many :users, through: :user_notifications
belongs_to :generator_user, class_name: 'User'
enum type_of: [:assignment, :recent_changes, :system_message]
end