json.status 0
json.message "success"
json.data do
  json.enroll_status @competition_user.present?
  json.status @competition_user&.status.to_i
  json.second_round @competition_info.identifier == "zstp2022" ? @second_round : true
  if @competition_user.present?
    json.enroll_info do
      json.extract! @competition_user, :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 @competition_user.user_id
      json.user_real_name @competition_user.user&.real_name
      json.members @competition_user.members
      json.api_result_text @competition_user.api_result_text
      json.enroll_template do
        file = Attachment.find_by(id: @competition_user.enroll_template_id)
        json.partial! 'attachments/attachment_simple', attachment: file if file.present?
      end
    end
  end
  json.upload_status @competition_user.present? ? @competition_user.attachments.present? : false
  if @competition_user.present? && @competition_user.attachments.present?
    json.attachments @competition_user.attachments do |attachment|
      json.partial! "attachments/attachment_simple", locals: { attachment: attachment }
    end
  end
end