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