json.status 0
json.message "success"
json.count @competition_users_count
json.data do
  json.array! @competition_users.to_a do |c_user|
    json.extract! c_user, :id, :org_name, :org_job, :org_rank, :leader, :zone, :sub_competition, :subject_source_type, :subject_source_name, :phone, :status, :mail, :ext1, :ext2, :ext3
    json.user_id c_user.user_id
    json.user_real_name c_user.user&.real_name
    json.members c_user.members
    json.enroll_template do
      file = Attachment.find_by(id: c_user.enroll_template_id)
      json.partial! 'attachments/attachment_simple', attachment: file if file.present?
    end
    json.attachments c_user.attachments do |attachment|
      json.partial! "attachments/attachment_simple", locals: {attachment: attachment}
    end
  end
end