module Enterprise::Concerns::Account
  extend ActiveSupport::Concern

  included do
    has_many :sla_policies, dependent: :destroy_async
    has_many :applied_slas, dependent: :destroy_async
    has_many :custom_roles, dependent: :destroy_async
    has_many :agent_capacity_policies, dependent: :destroy_async

    has_many :captain_assistants, dependent: :destroy_async, class_name: 'Captain::Assistant'
    has_many :captain_assistant_responses, dependent: :destroy_async, class_name: 'Captain::AssistantResponse'
    has_many :captain_documents, dependent: :destroy_async, class_name: 'Captain::Document'
    has_many :captain_units, class_name: '::Captain::Unit', dependent: :destroy_async
    has_many :captain_custom_tools, dependent: :destroy_async, class_name: 'Captain::CustomTool'
    has_many :captain_assets, dependent: :destroy_async, class_name: 'Captain::Asset'
    has_many :captain_reminders, dependent: :destroy_async, class_name: 'Captain::Reminder'
    has_many :captain_reservations, dependent: :destroy_async, class_name: 'Captain::Reservation'
    has_many :captain_inbox_reminder_settings, dependent: :destroy_async, class_name: 'Captain::InboxReminderSetting'
    has_many :captain_inbox_automations, dependent: :destroy_async, class_name: 'Captain::InboxAutomation'

    has_many :copilot_threads, dependent: :destroy_async
    has_many :companies, dependent: :destroy_async
    has_many :voice_channels, dependent: :destroy_async, class_name: '::Channel::Voice'

    has_one :saml_settings, dependent: :destroy_async, class_name: 'AccountSamlSettings'
  end
end
