report_serializer.rb 543 B

12345678910111213141516
  1. # frozen_string_literal: true
  2. class REST::Admin::ReportSerializer < ActiveModel::Serializer
  3. attributes :id, :action_taken, :comment, :created_at, :updated_at
  4. has_one :account, serializer: REST::Admin::AccountSerializer
  5. has_one :target_account, serializer: REST::Admin::AccountSerializer
  6. has_one :assigned_account, serializer: REST::Admin::AccountSerializer
  7. has_one :action_taken_by_account, serializer: REST::Admin::AccountSerializer
  8. has_many :statuses, serializer: REST::StatusSerializer
  9. def id
  10. object.id.to_s
  11. end
  12. end