2023-08-16 22:57:59 +03:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
|
|
# == Schema Information
|
|
|
|
|
#
|
|
|
|
|
# Table name: account_configs
|
|
|
|
|
#
|
|
|
|
|
# id :bigint not null, primary key
|
|
|
|
|
# key :string not null
|
|
|
|
|
# value :text not null
|
|
|
|
|
# created_at :datetime not null
|
|
|
|
|
# updated_at :datetime not null
|
|
|
|
|
# account_id :bigint not null
|
|
|
|
|
#
|
|
|
|
|
# Indexes
|
|
|
|
|
#
|
|
|
|
|
# index_account_configs_on_account_id (account_id)
|
|
|
|
|
# index_account_configs_on_account_id_and_key (account_id,key) UNIQUE
|
|
|
|
|
#
|
|
|
|
|
# Foreign Keys
|
|
|
|
|
#
|
|
|
|
|
# fk_rails_... (account_id => accounts.id)
|
|
|
|
|
#
|
|
|
|
|
class AccountConfig < ApplicationRecord
|
|
|
|
|
SUBMITTER_INVITATION_EMAIL_KEY = 'submitter_invitation_email'
|
2023-08-20 00:10:54 +03:00
|
|
|
SUBMITTER_COMPLETED_EMAIL_KEY = 'submitter_completed_email'
|
|
|
|
|
SUBMITTER_DOCUMENTS_COPY_EMAIL_KEY = 'submitter_documents_copy_email'
|
2023-09-17 20:38:09 +03:00
|
|
|
BCC_EMAILS = 'bcc_emails'
|
2023-12-02 01:50:54 +02:00
|
|
|
FORCE_MFA = 'force_mfa'
|
2023-12-02 16:26:34 +02:00
|
|
|
ALLOW_TYPED_SIGNATURE = 'allow_typed_signature'
|
2024-01-30 17:03:58 +02:00
|
|
|
ALLOW_TO_RESUBMIT = 'allow_to_resubmit'
|
2024-04-13 11:35:04 +03:00
|
|
|
SUBMITTER_REMINDERS = 'submitter_reminders'
|
2023-09-29 01:24:39 +03:00
|
|
|
FORM_COMPLETED_BUTTON_KEY = 'form_completed_button'
|
2024-04-05 16:16:30 +03:00
|
|
|
FORM_COMPLETED_MESSAGE_KEY = 'form_completed_message'
|
2024-01-26 17:43:52 +02:00
|
|
|
FORM_WITH_CONFETTI_KEY = 'form_with_confetti'
|
2024-06-15 15:55:09 +03:00
|
|
|
FORM_PREFILL_SIGNATURE_KEY = 'form_prefill_signature'
|
2023-12-21 23:29:06 +02:00
|
|
|
ESIGNING_PREFERENCE_KEY = 'esigning_preference'
|
2024-04-09 18:11:58 +03:00
|
|
|
WEBHOOK_PREFERENCES_KEY = 'webhook_preferences'
|
2024-04-15 19:58:24 +03:00
|
|
|
DOWNLOAD_LINKS_AUTH_KEY = 'download_links_auth'
|
2024-04-19 02:04:35 +03:00
|
|
|
FORCE_SSO_AUTH_KEY = 'force_sso_auth'
|
2024-04-22 21:34:55 +03:00
|
|
|
FLATTEN_RESULT_PDF_KEY = 'flatten_result_pdf'
|
2024-07-24 20:55:35 +03:00
|
|
|
WITH_SIGNATURE_ID = 'with_signature_id'
|
2024-09-30 16:27:15 +03:00
|
|
|
WITH_AUDIT_VALUES_KEY = 'with_audit_values'
|
2024-08-06 00:19:33 +03:00
|
|
|
REQUIRE_SIGNING_REASON_KEY = 'require_signing_reason'
|
2024-10-10 13:14:49 +03:00
|
|
|
REUSE_SIGNATURE_KEY = 'reuse_signature'
|
2024-08-23 23:46:22 +03:00
|
|
|
COMBINE_PDF_RESULT_KEY = 'combine_pdf_result_key'
|
2023-08-16 22:57:59 +03:00
|
|
|
|
|
|
|
|
DEFAULT_VALUES = {
|
2024-09-21 12:10:08 +03:00
|
|
|
SUBMITTER_INVITATION_EMAIL_KEY => lambda {
|
|
|
|
|
{
|
|
|
|
|
'subject' => I18n.t(:you_are_invited_to_sign_a_document),
|
|
|
|
|
'body' => I18n.t(:submitter_invitation_email_sign_body)
|
|
|
|
|
}
|
2023-08-20 00:10:54 +03:00
|
|
|
},
|
2024-09-21 12:10:08 +03:00
|
|
|
SUBMITTER_COMPLETED_EMAIL_KEY => lambda {
|
|
|
|
|
{
|
|
|
|
|
'subject' => I18n.t(:template_name_has_been_completed_by_submitters),
|
|
|
|
|
'body' => I18n.t(:submitter_completed_email_body)
|
|
|
|
|
}
|
2023-08-20 00:10:54 +03:00
|
|
|
},
|
2024-09-21 12:10:08 +03:00
|
|
|
SUBMITTER_DOCUMENTS_COPY_EMAIL_KEY => lambda {
|
|
|
|
|
{
|
|
|
|
|
'subject' => I18n.t(:your_document_copy),
|
|
|
|
|
'body' => I18n.t(:submitter_documents_copy_email_body)
|
|
|
|
|
}
|
2023-08-16 22:57:59 +03:00
|
|
|
}
|
|
|
|
|
}.freeze
|
|
|
|
|
|
|
|
|
|
belongs_to :account
|
|
|
|
|
|
2023-12-29 18:50:14 +00:00
|
|
|
serialize :value, coder: JSON
|
2023-08-16 22:57:59 +03:00
|
|
|
end
|