model_class.rb 574 B

123456789101112131415161718192021222324
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Sequencer::Unit::Import::Freshdesk::ModelClass < Sequencer::Unit::Common::Provider::Named
  3. prepend ::Sequencer::Unit::Import::Common::Model::Mixin::Skip::Action
  4. skip_action :skipped, :failed
  5. uses :object
  6. MAP = {
  7. 'Company' => ::Organization,
  8. 'Agent' => ::User,
  9. 'Contact' => ::User,
  10. 'Group' => ::Group,
  11. 'Ticket' => ::Ticket,
  12. 'Conversation' => ::Ticket::Article,
  13. }.freeze
  14. private
  15. def model_class
  16. MAP[object]
  17. end
  18. end