demarches-normaliennes/app/models/notification.rb
2017-05-30 15:53:19 +02:00

14 lines
311 B
Ruby

class Notification < ActiveRecord::Base
enum type_notif: {
commentaire: 'commentaire',
cerfa: 'cerfa',
piece_justificative: 'piece_justificative',
champs: 'champs',
submitted: 'submitted',
avis: 'avis'
}
belongs_to :dossier
scope :unread, -> { where(already_read: false) }
end