add new columns to deleted dossiers
This commit is contained in:
parent
fd766fcf04
commit
06f6cf7771
3 changed files with 25 additions and 9 deletions
|
@ -2,14 +2,17 @@
|
|||
#
|
||||
# Table name: deleted_dossiers
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# deleted_at :datetime
|
||||
# reason :string
|
||||
# state :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# dossier_id :bigint
|
||||
# procedure_id :bigint
|
||||
# id :bigint not null, primary key
|
||||
# deleted_at :datetime
|
||||
# reason :string
|
||||
# state :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# dossier_id :bigint
|
||||
# groupe_instructeur_id :bigint
|
||||
# procedure_id :bigint
|
||||
# revision_id :bigint
|
||||
# user_id :bigint
|
||||
#
|
||||
class DeletedDossier < ApplicationRecord
|
||||
belongs_to :procedure, -> { with_discarded }, inverse_of: :deleted_dossiers, optional: false
|
||||
|
@ -28,6 +31,9 @@ class DeletedDossier < ApplicationRecord
|
|||
create!(
|
||||
reason: reasons.fetch(reason),
|
||||
dossier_id: dossier.id,
|
||||
groupe_instructeur_id: dossier.groupe_instructeur_id,
|
||||
revision_id: dossier.revision_id,
|
||||
user_id: dossier.user_id,
|
||||
procedure: dossier.procedure,
|
||||
state: dossier.state,
|
||||
deleted_at: Time.zone.now
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue