2016-12-21 17:26:31 +01:00
|
|
|
class Notification < ActiveRecord::Base
|
|
|
|
belongs_to :dossier
|
2016-12-22 20:40:23 +01:00
|
|
|
enum type_notif: {
|
2016-12-26 11:33:12 +01:00
|
|
|
commentaire: 'commentaire',
|
2016-12-26 11:42:02 +01:00
|
|
|
cerfa: 'cerfa',
|
2016-12-26 11:47:51 +01:00
|
|
|
piece_justificative: 'piece_justificative',
|
2016-12-26 11:57:08 +01:00
|
|
|
champs: 'champs',
|
2017-05-22 17:10:17 +02:00
|
|
|
submitted: 'submitted',
|
|
|
|
avis: 'avis'
|
2016-12-22 20:40:23 +01:00
|
|
|
}
|
2017-04-26 11:28:58 +02:00
|
|
|
scope :unread, -> { where(already_read: false) }
|
2016-12-21 17:26:31 +01:00
|
|
|
end
|