chore(schema): +dossier_corrections#kind

This commit is contained in:
Colin Darie 2023-06-14 13:13:30 +02:00
parent 93b0af50cc
commit 1c977c72bf
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
3 changed files with 9 additions and 0 deletions

View file

@ -3,6 +3,7 @@
# Table name: dossier_corrections
#
# id :bigint not null, primary key
# kind :string default("correction"), not null
# resolved_at :datetime
# created_at :datetime not null
# updated_at :datetime not null
@ -17,6 +18,8 @@ class DossierCorrection < ApplicationRecord
scope :pending, -> { where(resolved_at: nil) }
enum kind: { correction: 'correction', incomplete: 'incomplete' }
def resolved?
resolved_at.present?
end