mapping.rb 601 B

12345678910111213141516171819
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Sequencer::Unit::Import::Kayako::Post::Mapping < Sequencer::Unit::Base
  3. include ::Sequencer::Unit::Import::Common::Mapping::Mixin::ProvideMapped
  4. uses :instance, :resource, :created_by_id, :article_sender_id, :article_source_channel
  5. provides :mapped
  6. def process
  7. provide_mapped do
  8. {
  9. ticket_id: instance.id,
  10. sender_id: article_sender_id,
  11. created_by_id: created_by_id,
  12. updated_by_id: created_by_id,
  13. }.merge(article_source_channel.mapping)
  14. end
  15. end
  16. end