chore(annotate): remove model comments
This commit is contained in:
parent
19902f46bf
commit
0f6188a542
90 changed files with 0 additions and 1666 deletions
|
@ -1,12 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: administrateurs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# user_id :bigint not null
|
||||
#
|
||||
class Administrateur < ApplicationRecord
|
||||
UNUSED_ADMIN_THRESHOLD = ENV.fetch('UNUSED_ADMIN_THRESHOLD') { 6 }.to_i.months
|
||||
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: administrateurs_instructeurs
|
||||
#
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# administrateur_id :integer not null
|
||||
# instructeur_id :integer not null
|
||||
#
|
||||
class AdministrateursInstructeur < ApplicationRecord
|
||||
belongs_to :administrateur
|
||||
belongs_to :instructeur
|
||||
|
|
|
@ -1,13 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: administrateurs_procedures
|
||||
#
|
||||
# manager :boolean
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# administrateur_id :bigint not null
|
||||
# procedure_id :bigint not null
|
||||
#
|
||||
class AdministrateursProcedure < ApplicationRecord
|
||||
belongs_to :administrateur
|
||||
belongs_to :procedure
|
||||
|
|
|
@ -1,17 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: api_tokens
|
||||
#
|
||||
# id :uuid not null, primary key
|
||||
# allowed_procedure_ids :bigint is an Array
|
||||
# encrypted_token :string not null
|
||||
# name :string not null
|
||||
# write_access :boolean default(TRUE), not null
|
||||
# version :integer default(3), not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# administrateur_id :bigint not null
|
||||
#
|
||||
class APIToken < ApplicationRecord
|
||||
include ActiveRecord::SecureToken
|
||||
|
||||
|
|
|
@ -1,15 +1,4 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: archives
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# job_status :string not null
|
||||
# key :text not null
|
||||
# month :date
|
||||
# time_span_type :string not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
class Archive < ApplicationRecord
|
||||
include TransientModelsWithPurgeableJobConcern
|
||||
|
||||
|
|
|
@ -1,19 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: assign_tos
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# daily_email_notifications_enabled :boolean default(FALSE), not null
|
||||
# instant_email_dossier_notifications_enabled :boolean default(FALSE), not null
|
||||
# instant_email_message_notifications_enabled :boolean default(FALSE), not null
|
||||
# instant_expert_avis_email_notifications_enabled :boolean default(FALSE)
|
||||
# manager :boolean default(FALSE)
|
||||
# weekly_email_notifications_enabled :boolean default(TRUE), not null
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# groupe_instructeur_id :bigint
|
||||
# instructeur_id :integer
|
||||
#
|
||||
class AssignTo < ApplicationRecord
|
||||
belongs_to :instructeur, optional: false
|
||||
belongs_to :groupe_instructeur, optional: false
|
||||
|
|
|
@ -1,13 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: attestations
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# title :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# dossier_id :integer not null
|
||||
#
|
||||
class Attestation < ApplicationRecord
|
||||
belongs_to :dossier, optional: false
|
||||
|
||||
|
|
|
@ -1,16 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: attestation_templates
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# activated :boolean
|
||||
# body :text
|
||||
# footer :text
|
||||
# title :text
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# procedure_id :integer
|
||||
#
|
||||
class AttestationTemplate < ApplicationRecord
|
||||
include ActionView::Helpers::NumberHelper
|
||||
include TagsSubstitutionConcern
|
||||
|
|
|
@ -1,23 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: avis
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# answer :text
|
||||
# claimant_type :string
|
||||
# confidentiel :boolean default(FALSE), not null
|
||||
# email :string
|
||||
# introduction :text
|
||||
# question_answer :boolean
|
||||
# question_label :string
|
||||
# reminded_at :datetime
|
||||
# revoked_at :datetime
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# claimant_id :integer not null
|
||||
# dossier_id :integer
|
||||
# experts_procedure_id :bigint
|
||||
#
|
||||
class Avis < ApplicationRecord
|
||||
include EmailSanitizableConcern
|
||||
|
||||
|
|
|
@ -1,20 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: batch_operations
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# failed_dossier_ids :bigint default([]), not null, is an Array
|
||||
# finished_at :datetime
|
||||
# operation :string not null
|
||||
# payload :jsonb not null
|
||||
# run_at :datetime
|
||||
# seen_at :datetime
|
||||
# success_dossier_ids :bigint default([]), not null, is an Array
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# instructeur_id :bigint not null
|
||||
#
|
||||
|
||||
class BatchOperation < ApplicationRecord
|
||||
enum operation: {
|
||||
accepter: 'accepter',
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: bill_signatures
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# digest :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
class BillSignature < ApplicationRecord
|
||||
has_many :dossier_operation_logs
|
||||
|
||||
|
|
|
@ -1,16 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: bulk_messages
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# body :text not null
|
||||
# dossier_count :integer
|
||||
# dossier_state :string
|
||||
# sent_at :datetime not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# instructeur_id :bigint not null
|
||||
#
|
||||
class BulkMessage < ApplicationRecord
|
||||
belongs_to :instructeur
|
||||
has_and_belongs_to_many :groupe_instructeurs, -> { order(:label) }
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champ < ApplicationRecord
|
||||
include ChampConditionalConcern
|
||||
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::AddressChamp < Champs::TextChamp
|
||||
def full_address?
|
||||
data.present?
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::AnnuaireEducationChamp < Champs::TextChamp
|
||||
def fetch_external_data?
|
||||
true
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::BooleanChamp < Champ
|
||||
TRUE_VALUE = 'true'
|
||||
FALSE_VALUE = 'false'
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::CarteChamp < Champ
|
||||
# Default map location. Center of the World, ahm, France...
|
||||
DEFAULT_LON = 2.428462
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::CheckboxChamp < Champs::BooleanChamp
|
||||
def for_export
|
||||
true? ? 'on' : 'off'
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::CiviliteChamp < Champ
|
||||
validates :value, inclusion: ["M.", "Mme"], allow_nil: true, allow_blank: false
|
||||
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::CnafChamp < Champs::TextChamp
|
||||
# see https://github.com/betagouv/api-particulier/blob/master/src/presentation/middlewares/cnaf-input-validation.middleware.ts
|
||||
validates :numero_allocataire, format: { with: /\A\d{1,7}\z/ }, if: -> { code_postal.present? && validation_context != :brouillon }
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::CommuneChamp < Champs::TextChamp
|
||||
store_accessor :value_json, :code_departement, :code_postal
|
||||
before_validation :on_code_postal_change
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::DateChamp < Champ
|
||||
before_validation :convert_to_iso8601, unless: -> { validation_context == :prefill }
|
||||
validate :iso_8601
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::DatetimeChamp < Champ
|
||||
before_validation :convert_to_iso8601, unless: -> { validation_context == :prefill }
|
||||
validate :iso_8601
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::DecimalNumberChamp < Champ
|
||||
validates :value, numericality: {
|
||||
allow_nil: true,
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::DepartementChamp < Champs::TextChamp
|
||||
validate :value_in_departement_names, unless: -> { value.nil? }
|
||||
validate :external_id_in_departement_codes, unless: -> { external_id.nil? }
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::DgfipChamp < Champs::TextChamp
|
||||
# see https://github.com/betagouv/api-particulier/blob/master/src/presentation/middlewares/dgfip-input-validation.middleware.ts
|
||||
validates :numero_fiscal, format: { with: /\A\w{13,14}\z/ }, if: -> { reference_avis.present? && validation_context != :brouillon }
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::DossierLinkChamp < Champ
|
||||
validate :value_integerable, if: -> { value.present? }, on: :prefill
|
||||
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::DropDownListChamp < Champ
|
||||
store_accessor :value_json, :other
|
||||
THRESHOLD_NB_OPTIONS_AS_RADIO = 5
|
||||
|
|
|
@ -1,24 +1,2 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::EmailChamp < Champs::TextChamp
|
||||
end
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::EpciChamp < Champs::TextChamp
|
||||
store_accessor :value_json, :code_departement
|
||||
before_validation :on_departement_change
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::ExplicationChamp < Champs::TextChamp
|
||||
def search_terms
|
||||
# The user cannot enter any information here so it doesn’t make much sense to search
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::HeaderSectionChamp < Champ
|
||||
def level
|
||||
if parent.present?
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::IbanChamp < Champ
|
||||
validates_with IbanValidator, if: -> { validation_context != :brouillon }
|
||||
after_validation :format_iban
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::IntegerNumberChamp < Champ
|
||||
validates :value, numericality: {
|
||||
only_integer: true,
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::LinkedDropDownListChamp < Champ
|
||||
delegate :primary_options, :secondary_options, to: 'type_de_champ.dynamic_type'
|
||||
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::MesriChamp < Champs::TextChamp
|
||||
# see https://github.com/betagouv/api-particulier/blob/master/src/presentation/middlewares/mesri-input-validation.middleware.ts
|
||||
store_accessor :value_json, :ine
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::MultipleDropDownListChamp < Champ
|
||||
validate :values_are_in_options, if: -> { value.present? }
|
||||
|
||||
|
|
|
@ -1,24 +1,2 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::NumberChamp < Champ
|
||||
end
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::PaysChamp < Champs::TextChamp
|
||||
validates :value, inclusion: APIGeoService.countries.pluck(:name), allow_nil: true, allow_blank: false
|
||||
validates :external_id, inclusion: APIGeoService.countries.pluck(:code), allow_nil: true, allow_blank: false
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::PhoneChamp < Champs::TextChamp
|
||||
# We want to allow:
|
||||
# * international (e164) phone numbers
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::PieceJustificativeChamp < Champ
|
||||
FILE_MAX_SIZE = 200.megabytes
|
||||
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::PoleEmploiChamp < Champs::TextChamp
|
||||
# see https://github.com/betagouv/api-particulier/blob/master/src/presentation/middlewares/pole-emploi-input-validation.middleware.ts
|
||||
store_accessor :value_json, :identifiant
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::RegionChamp < Champs::TextChamp
|
||||
validate :value_in_region_names, unless: -> { value.nil? }
|
||||
validate :external_id_in_region_codes, unless: -> { external_id.nil? }
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::RepetitionChamp < Champ
|
||||
accepts_nested_attributes_for :champs
|
||||
delegate :libelle_for_export, to: :type_de_champ
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::RNAChamp < Champ
|
||||
include RNAChampAssociationFetchableConcern
|
||||
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::SiretChamp < Champ
|
||||
include SiretChampEtablissementFetchableConcern
|
||||
|
||||
|
|
|
@ -1,24 +1,2 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::TextChamp < Champ
|
||||
end
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::TextareaChamp < Champs::TextChamp
|
||||
def for_export
|
||||
value.present? ? ActionView::Base.full_sanitizer.sanitize(value) : nil
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::TitreIdentiteChamp < Champ
|
||||
FILE_MAX_SIZE = 20.megabytes
|
||||
ACCEPTED_FORMATS = ['image/png', 'image/jpeg']
|
||||
|
|
|
@ -1,25 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: champs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# data :jsonb
|
||||
# fetch_external_data_exceptions :string is an Array
|
||||
# prefilled :boolean default(FALSE)
|
||||
# private :boolean default(FALSE), not null
|
||||
# rebased_at :datetime
|
||||
# type :string
|
||||
# value :string
|
||||
# value_json :jsonb
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# etablissement_id :integer
|
||||
# external_id :string
|
||||
# parent_id :bigint
|
||||
# row_id :string
|
||||
# type_de_champ_id :integer
|
||||
#
|
||||
class Champs::YesNoChamp < Champs::BooleanChamp
|
||||
def yes_input_id
|
||||
"#{input_id}-yes"
|
||||
|
|
|
@ -1,17 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: commentaires
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# body :string
|
||||
# discarded_at :datetime
|
||||
# email :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# dossier_id :integer
|
||||
# expert_id :bigint
|
||||
# instructeur_id :bigint
|
||||
#
|
||||
class Commentaire < ApplicationRecord
|
||||
include Discard::Model
|
||||
|
||||
|
|
|
@ -1,19 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# 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
|
||||
# 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
|
||||
belongs_to :groupe_instructeur, inverse_of: :deleted_dossiers, optional: true
|
||||
|
|
|
@ -1,54 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: dossiers
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# api_entreprise_job_exceptions :string is an Array
|
||||
# archived :boolean default(FALSE)
|
||||
# archived_at :datetime
|
||||
# archived_by :string
|
||||
# autorisation_donnees :boolean
|
||||
# brouillon_close_to_expiration_notice_sent_at :datetime
|
||||
# conservation_extension :interval default(0 seconds)
|
||||
# declarative_triggered_at :datetime
|
||||
# deleted_user_email_never_send :string
|
||||
# depose_at :datetime
|
||||
# en_construction_at :datetime
|
||||
# en_construction_close_to_expiration_notice_sent_at :datetime
|
||||
# en_instruction_at :datetime
|
||||
# for_procedure_preview :boolean default(FALSE)
|
||||
# forced_groupe_instructeur :boolean
|
||||
# groupe_instructeur_updated_at :datetime
|
||||
# hidden_at :datetime
|
||||
# hidden_by_administration_at :datetime
|
||||
# hidden_by_reason :string
|
||||
# hidden_by_user_at :datetime
|
||||
# identity_updated_at :datetime
|
||||
# last_avis_updated_at :datetime
|
||||
# last_champ_private_updated_at :datetime
|
||||
# last_champ_updated_at :datetime
|
||||
# last_commentaire_updated_at :datetime
|
||||
# migrated_champ_routage :boolean
|
||||
# motivation :text
|
||||
# prefill_token :string
|
||||
# prefilled :boolean
|
||||
# private_search_terms :string
|
||||
# processed_at :datetime
|
||||
# search_terms :string
|
||||
# state :string
|
||||
# sva_svr_decision_on :date
|
||||
# sva_svr_decision_triggered_at :datetime
|
||||
# termine_close_to_expiration_notice_sent_at :datetime
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# batch_operation_id :bigint
|
||||
# dossier_transfer_id :bigint
|
||||
# editing_fork_origin_id :bigint
|
||||
# groupe_instructeur_id :bigint
|
||||
# parent_dossier_id :bigint
|
||||
# revision_id :bigint
|
||||
# user_id :integer
|
||||
#
|
||||
class Dossier < ApplicationRecord
|
||||
include DossierCloneConcern
|
||||
include DossierCorrectableConcern
|
||||
|
|
|
@ -1,17 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: dossier_assignments
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# assigned_at :datetime not null
|
||||
# assigned_by :string
|
||||
# groupe_instructeur_label :string
|
||||
# mode :string not null
|
||||
# previous_groupe_instructeur_label :string
|
||||
# dossier_id :bigint not null
|
||||
# groupe_instructeur_id :bigint
|
||||
# previous_groupe_instructeur_id :bigint
|
||||
#
|
||||
class DossierAssignment < ApplicationRecord
|
||||
belongs_to :dossier
|
||||
|
||||
|
|
|
@ -1,14 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: dossier_batch_operations
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# state :string default("pending"), not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# batch_operation_id :bigint not null
|
||||
# dossier_id :bigint not null
|
||||
#
|
||||
class DossierBatchOperation < ApplicationRecord
|
||||
belongs_to :dossier
|
||||
belongs_to :batch_operation
|
||||
|
|
|
@ -1,15 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: dossier_corrections
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# reason :string default("incorrect"), not null
|
||||
# resolved_at :datetime
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# commentaire_id :bigint
|
||||
# dossier_id :bigint not null
|
||||
#
|
||||
class DossierCorrection < ApplicationRecord
|
||||
belongs_to :dossier
|
||||
belongs_to :commentaire
|
||||
|
|
|
@ -1,19 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: dossier_operation_logs
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# automatic_operation :boolean default(FALSE), not null
|
||||
# data :jsonb
|
||||
# digest :text
|
||||
# executed_at :datetime
|
||||
# keep_until :datetime
|
||||
# operation :string not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# bill_signature_id :bigint
|
||||
# dossier_id :bigint
|
||||
#
|
||||
class DossierOperationLog < ApplicationRecord
|
||||
enum operation: {
|
||||
changer_groupe_instructeur: 'changer_groupe_instructeur',
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: dossier_submitted_messages
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# message_on_submit_by_usager :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
class DossierSubmittedMessage < ApplicationRecord
|
||||
has_many :revisions, class_name: 'ProcedureRevision', inverse_of: :dossier_submitted_message, dependent: :nullify
|
||||
end
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: dossier_transfers
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# email :string not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
class DossierTransfer < ApplicationRecord
|
||||
include EmailSanitizableConcern
|
||||
has_many :dossiers, dependent: :nullify
|
||||
|
|
|
@ -1,14 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: dossier_transfer_logs
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# from :string not null
|
||||
# to :string not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# dossier_id :bigint not null
|
||||
#
|
||||
class DossierTransferLog < ApplicationRecord
|
||||
belongs_to :dossier
|
||||
end
|
||||
|
|
|
@ -1,17 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: email_events
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# method :string not null
|
||||
# processed_at :datetime
|
||||
# status :string not null
|
||||
# subject :string not null
|
||||
# to :string not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# message_id :string
|
||||
#
|
||||
class EmailEvent < ApplicationRecord
|
||||
RETENTION_DURATION = 1.month
|
||||
|
||||
|
|
|
@ -1,52 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: etablissements
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# adresse :string
|
||||
# association_date_creation :date
|
||||
# association_date_declaration :date
|
||||
# association_date_publication :date
|
||||
# association_objet :text
|
||||
# association_rna :string
|
||||
# association_titre :string
|
||||
# code_insee_localite :string
|
||||
# code_postal :string
|
||||
# complement_adresse :string
|
||||
# diffusable_commercialement :boolean
|
||||
# enseigne :string
|
||||
# entreprise_bilans_bdf :jsonb
|
||||
# entreprise_bilans_bdf_monnaie :string
|
||||
# entreprise_capital_social :bigint
|
||||
# entreprise_code_effectif_entreprise :string
|
||||
# entreprise_date_creation :date
|
||||
# entreprise_effectif_annee :string
|
||||
# entreprise_effectif_annuel :decimal(, )
|
||||
# entreprise_effectif_annuel_annee :string
|
||||
# entreprise_effectif_mensuel :decimal(, )
|
||||
# entreprise_effectif_mois :string
|
||||
# entreprise_etat_administratif :string
|
||||
# entreprise_forme_juridique :string
|
||||
# entreprise_forme_juridique_code :string
|
||||
# entreprise_nom :string
|
||||
# entreprise_nom_commercial :string
|
||||
# entreprise_numero_tva_intracommunautaire :string
|
||||
# entreprise_prenom :string
|
||||
# entreprise_raison_sociale :string
|
||||
# entreprise_siren :string
|
||||
# entreprise_siret_siege_social :string
|
||||
# libelle_naf :string
|
||||
# localite :string
|
||||
# naf :string
|
||||
# nom_voie :string
|
||||
# numero_voie :string
|
||||
# siege_social :boolean
|
||||
# siret :string
|
||||
# type_voie :string
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
#
|
||||
class Etablissement < ApplicationRecord
|
||||
belongs_to :dossier, optional: true
|
||||
|
||||
|
|
|
@ -1,16 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: exercices
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# ca :string
|
||||
# dateFinExercice :datetime
|
||||
# date_fin_exercice :datetime
|
||||
# date_fin_exercice_timestamp :integer
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# etablissement_id :integer
|
||||
#
|
||||
class Exercice < ApplicationRecord
|
||||
belongs_to :etablissement, optional: false
|
||||
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: experts
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# user_id :bigint not null
|
||||
#
|
||||
class Expert < ApplicationRecord
|
||||
belongs_to :user
|
||||
has_many :experts_procedures
|
||||
|
|
|
@ -1,15 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: experts_procedures
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# allow_decision_access :boolean default(FALSE), not null
|
||||
# revoked_at :datetime
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# expert_id :bigint not null
|
||||
# procedure_id :bigint not null
|
||||
#
|
||||
class ExpertsProcedure < ApplicationRecord
|
||||
belongs_to :expert
|
||||
belongs_to :procedure
|
||||
|
|
|
@ -1,18 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: exports
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# format :string not null
|
||||
# job_status :string default("pending"), not null
|
||||
# key :text not null
|
||||
# procedure_presentation_snapshot :jsonb
|
||||
# statut :string default("tous")
|
||||
# time_span_type :string default("everything"), not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# procedure_presentation_id :bigint
|
||||
#
|
||||
class Export < ApplicationRecord
|
||||
include TransientModelsWithPurgeableJobConcern
|
||||
|
||||
|
|
|
@ -1,18 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: follows
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# annotations_privees_seen_at :datetime not null
|
||||
# avis_seen_at :datetime not null
|
||||
# demande_seen_at :datetime not null
|
||||
# messagerie_seen_at :datetime not null
|
||||
# unfollowed_at :datetime
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer not null
|
||||
# instructeur_id :integer not null
|
||||
#
|
||||
class Follow < ApplicationRecord
|
||||
belongs_to :instructeur, optional: false
|
||||
belongs_to :dossier, optional: false
|
||||
|
|
|
@ -1,22 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: france_connect_informations
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# birthdate :date
|
||||
# birthplace :string
|
||||
# data :jsonb
|
||||
# email_france_connect :string
|
||||
# family_name :string
|
||||
# gender :string
|
||||
# given_name :string
|
||||
# merge_token :string
|
||||
# merge_token_created_at :datetime
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# france_connect_particulier_id :string
|
||||
# user_id :integer
|
||||
#
|
||||
class FranceConnectInformation < ApplicationRecord
|
||||
MERGE_VALIDITY = 15.minutes
|
||||
|
||||
|
|
|
@ -1,16 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: geo_areas
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# geometry :jsonb
|
||||
# properties :jsonb
|
||||
# source :string
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# champ_id :bigint
|
||||
# geo_reference_id :string
|
||||
#
|
||||
class GeoArea < ApplicationRecord
|
||||
include ActionView::Helpers::NumberHelper
|
||||
belongs_to :champ, optional: false
|
||||
|
|
|
@ -1,15 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: groupe_instructeurs
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# closed :boolean default(FALSE)
|
||||
# label :text not null
|
||||
# routing_rule :jsonb
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# procedure_id :bigint not null
|
||||
#
|
||||
class GroupeInstructeur < ApplicationRecord
|
||||
include Logic
|
||||
DEFAUT_LABEL = 'défaut'
|
||||
|
|
|
@ -1,16 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: individuals
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# birthdate :date
|
||||
# gender :string
|
||||
# nom :string
|
||||
# prenom :string
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
#
|
||||
class Individual < ApplicationRecord
|
||||
belongs_to :dossier, optional: false
|
||||
|
||||
|
|
|
@ -1,16 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: instructeurs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# bypass_email_login_token :boolean default(FALSE), not null
|
||||
# encrypted_login_token :text
|
||||
# login_token_created_at :datetime
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# agent_connect_id :string
|
||||
# user_id :bigint not null
|
||||
#
|
||||
class Instructeur < ApplicationRecord
|
||||
has_and_belongs_to_many :administrateurs
|
||||
|
||||
|
|
|
@ -1,16 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: invites
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# email :string
|
||||
# email_sender :string
|
||||
# message :text
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# dossier_id :integer
|
||||
# user_id :integer
|
||||
#
|
||||
class Invite < ApplicationRecord
|
||||
include EmailSanitizableConcern
|
||||
|
||||
|
|
|
@ -1,14 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: merge_logs
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# from_user_email :string not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# from_user_id :bigint not null
|
||||
# user_id :bigint not null
|
||||
#
|
||||
class MergeLog < ApplicationRecord
|
||||
belongs_to :user
|
||||
end
|
||||
|
|
|
@ -1,16 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: module_api_cartos
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# cadastre :boolean default(FALSE)
|
||||
# migrated :boolean
|
||||
# quartiers_prioritaires :boolean default(FALSE)
|
||||
# use_api_carto :boolean default(FALSE)
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# procedure_id :integer
|
||||
#
|
||||
class ModuleAPICarto < ApplicationRecord
|
||||
belongs_to :procedure, optional: false
|
||||
end
|
||||
|
|
|
@ -1,69 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: procedures
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# aasm_state :string default("brouillon")
|
||||
# allow_expert_messaging :boolean default(TRUE), not null
|
||||
# allow_expert_review :boolean default(TRUE), not null
|
||||
# api_entreprise_token :string
|
||||
# api_particulier_scopes :text default([]), is an Array
|
||||
# api_particulier_sources :jsonb
|
||||
# ask_birthday :boolean default(FALSE), not null
|
||||
# auto_archive_on :date
|
||||
# cadre_juridique :string
|
||||
# cloned_from_library :boolean default(FALSE)
|
||||
# closed_at :datetime
|
||||
# declarative_with_state :string
|
||||
# description :string
|
||||
# description_pj :string
|
||||
# description_target_audience :string
|
||||
# dossiers_count_computed_at :datetime
|
||||
# duree_conservation_dossiers_dans_ds :integer
|
||||
# duree_conservation_etendue_par_ds :boolean default(FALSE), not null
|
||||
# encrypted_api_particulier_token :string
|
||||
# estimated_dossiers_count :integer
|
||||
# estimated_duration_visible :boolean default(TRUE), not null
|
||||
# euro_flag :boolean default(FALSE)
|
||||
# experts_require_administrateur_invitation :boolean default(FALSE)
|
||||
# for_individual :boolean default(FALSE)
|
||||
# hidden_at :datetime
|
||||
# instructeurs_self_management_enabled :boolean
|
||||
# juridique_required :boolean default(TRUE)
|
||||
# libelle :string
|
||||
# lien_dpo :string
|
||||
# lien_dpo_error :text
|
||||
# lien_notice :string
|
||||
# lien_notice_error :text
|
||||
# lien_site_web :string
|
||||
# max_duree_conservation_dossiers_dans_ds :integer default(12), not null
|
||||
# migrated_champ_routage :boolean
|
||||
# monavis_embed :text
|
||||
# opendata :boolean default(TRUE)
|
||||
# organisation :string
|
||||
# path :string not null
|
||||
# piece_justificative_multiple :boolean default(TRUE), not null
|
||||
# procedure_expires_when_termine_enabled :boolean default(TRUE)
|
||||
# published_at :datetime
|
||||
# routing_criteria_name :text default("Votre ville")
|
||||
# routing_enabled :boolean
|
||||
# sva_svr :jsonb not null
|
||||
# tags :text default([]), is an Array
|
||||
# unpublished_at :datetime
|
||||
# web_hook_url :string
|
||||
# whitelisted_at :datetime
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# canonical_procedure_id :bigint
|
||||
# defaut_groupe_instructeur_id :bigint
|
||||
# draft_revision_id :bigint
|
||||
# parent_procedure_id :bigint
|
||||
# published_revision_id :bigint
|
||||
# replaced_by_procedure_id :bigint
|
||||
# service_id :bigint
|
||||
# zone_id :bigint
|
||||
#
|
||||
|
||||
class Procedure < ApplicationRecord
|
||||
include ProcedureStatsConcern
|
||||
include EncryptableConcern
|
||||
|
|
|
@ -1,15 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: procedure_presentations
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# displayed_fields :jsonb not null
|
||||
# filters :jsonb not null
|
||||
# sort :jsonb not null
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# assign_to_id :integer
|
||||
#
|
||||
class ProcedurePresentation < ApplicationRecord
|
||||
EXTRA_SORT_COLUMNS = {
|
||||
'notifications' => ['notifications'],
|
||||
|
|
|
@ -1,16 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: procedure_revisions
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# migrated_champ_routage :boolean
|
||||
# published_at :datetime
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# attestation_template_id :bigint
|
||||
# dossier_submitted_message_id :bigint
|
||||
# procedure_id :bigint not null
|
||||
#
|
||||
class ProcedureRevision < ApplicationRecord
|
||||
self.implicit_order_column = :created_at
|
||||
belongs_to :procedure, -> { with_discarded }, inverse_of: :revisions, optional: false
|
||||
|
|
|
@ -1,15 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: procedure_revision_types_de_champ
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# position :integer not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# parent_id :bigint
|
||||
# revision_id :bigint not null
|
||||
# type_de_champ_id :bigint not null
|
||||
#
|
||||
class ProcedureRevisionTypeDeChamp < ApplicationRecord
|
||||
belongs_to :revision, class_name: 'ProcedureRevision'
|
||||
belongs_to :type_de_champ
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: safe_mailers
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# forced_delivery_method :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
class SafeMailer < ApplicationRecord
|
||||
before_create do
|
||||
raise if SafeMailer.count == 1
|
||||
|
|
|
@ -1,23 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: services
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# adresse :text
|
||||
# email :string
|
||||
# etablissement_infos :jsonb
|
||||
# etablissement_lat :decimal(10, 6)
|
||||
# etablissement_lng :decimal(10, 6)
|
||||
# horaires :text
|
||||
# nom :string not null
|
||||
# organisme :string
|
||||
# siret :string
|
||||
# telephone :string
|
||||
# type_organisme :string not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# administrateur_id :bigint
|
||||
#
|
||||
class Service < ApplicationRecord
|
||||
has_many :procedures
|
||||
belongs_to :administrateur, optional: false
|
||||
|
|
|
@ -1,21 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: stats
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# administrations_partenaires :bigint default(0)
|
||||
# dossiers_brouillon :bigint default(0)
|
||||
# dossiers_cumulative :jsonb not null
|
||||
# dossiers_depose_avant_30_jours :bigint default(0)
|
||||
# dossiers_deposes_entre_60_et_30_jours :bigint default(0)
|
||||
# dossiers_en_construction :bigint default(0)
|
||||
# dossiers_en_instruction :bigint default(0)
|
||||
# dossiers_in_the_last_4_months :jsonb not null
|
||||
# dossiers_not_brouillon :bigint default(0)
|
||||
# dossiers_termines :bigint default(0)
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
class Stat < ApplicationRecord
|
||||
class << self
|
||||
def update_stats
|
||||
|
|
|
@ -1,30 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: super_admins
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# consumed_timestep :integer
|
||||
# current_sign_in_at :datetime
|
||||
# current_sign_in_ip :string
|
||||
# email :string default(""), not null
|
||||
# encrypted_otp_secret :string
|
||||
# encrypted_otp_secret_iv :string
|
||||
# encrypted_otp_secret_salt :string
|
||||
# encrypted_password :string default(""), not null
|
||||
# failed_attempts :integer default(0), not null
|
||||
# last_sign_in_at :datetime
|
||||
# last_sign_in_ip :string
|
||||
# locked_at :datetime
|
||||
# otp_required_for_login :boolean
|
||||
# otp_secret :string
|
||||
# remember_created_at :datetime
|
||||
# reset_password_sent_at :datetime
|
||||
# reset_password_token :string
|
||||
# sign_in_count :integer default(0), not null
|
||||
# unlock_token :string
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
#
|
||||
class SuperAdmin < ApplicationRecord
|
||||
include PasswordComplexityConcern
|
||||
|
||||
|
|
|
@ -1,15 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: targeted_user_links
|
||||
#
|
||||
# id :uuid not null, primary key
|
||||
# target_context :string not null
|
||||
# target_model_type :string not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# target_model_id :bigint not null
|
||||
# user_id :bigint
|
||||
#
|
||||
class TargetedUserLink < ApplicationRecord
|
||||
belongs_to :user, optional: true
|
||||
belongs_to :target_model, polymorphic: true, optional: false
|
||||
|
|
|
@ -1,16 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: traitements
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# instructeur_email :string
|
||||
# motivation :string
|
||||
# process_expired :boolean
|
||||
# process_expired_migrated :boolean default(FALSE)
|
||||
# processed_at :datetime
|
||||
# state :string
|
||||
# dossier_id :bigint
|
||||
#
|
||||
class Traitement < ApplicationRecord
|
||||
belongs_to :dossier, optional: false
|
||||
|
||||
|
|
|
@ -1,13 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: trusted_device_tokens
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# token :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# instructeur_id :bigint
|
||||
#
|
||||
class TrustedDeviceToken < ApplicationRecord
|
||||
LOGIN_TOKEN_VALIDITY = 1.week
|
||||
LOGIN_TOKEN_YOUTH = 15.minutes
|
||||
|
|
|
@ -1,19 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: types_de_champ
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# condition :jsonb
|
||||
# description :text
|
||||
# libelle :string
|
||||
# mandatory :boolean default(FALSE)
|
||||
# options :jsonb
|
||||
# private :boolean default(FALSE), not null
|
||||
# type_champ :string
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# stable_id :bigint
|
||||
#
|
||||
class TypeDeChamp < ApplicationRecord
|
||||
self.ignored_columns += [:migrated_parent, :revision_id, :parent_id, :order_place]
|
||||
|
||||
|
|
|
@ -1,35 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: users
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# blocked_at :datetime
|
||||
# blocked_reason :text
|
||||
# confirmation_sent_at :datetime
|
||||
# confirmation_token :string
|
||||
# confirmed_at :datetime
|
||||
# current_sign_in_at :datetime
|
||||
# current_sign_in_ip :string
|
||||
# email :string default(""), not null
|
||||
# encrypted_password :string default(""), not null
|
||||
# failed_attempts :integer default(0), not null
|
||||
# last_sign_in_at :datetime
|
||||
# last_sign_in_ip :string
|
||||
# locale :string
|
||||
# locked_at :datetime
|
||||
# loged_in_with_france_connect :string default(NULL)
|
||||
# remember_created_at :datetime
|
||||
# reset_password_sent_at :datetime
|
||||
# reset_password_token :string
|
||||
# sign_in_count :integer default(0), not null
|
||||
# siret :string
|
||||
# team_account :boolean default(FALSE)
|
||||
# unconfirmed_email :text
|
||||
# unlock_token :string
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# requested_merge_into_id :bigint
|
||||
#
|
||||
class User < ApplicationRecord
|
||||
include EmailSanitizableConcern
|
||||
include PasswordComplexityConcern
|
||||
|
|
|
@ -1,14 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: zones
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# acronym :string not null
|
||||
# label :string
|
||||
# tchap_hs :string default([]), is an Array
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
class Zone < ApplicationRecord
|
||||
validates :acronym, presence: true, uniqueness: true
|
||||
has_many :labels, -> { order(designated_on: :desc) }, class_name: 'ZoneLabel', inverse_of: :zone
|
||||
|
|
|
@ -1,14 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: zone_labels
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# designated_on :date not null
|
||||
# name :string not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# zone_id :bigint not null
|
||||
#
|
||||
class ZoneLabel < ApplicationRecord
|
||||
belongs_to :zone
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue