json.shixun do
  json.status @shixun.status
  json.name @shixun.name
  json.description @shixun.description

  # 镜像大小类别
  json.main_type @main_type
  json.choice_main_type @choice_main_type
  json.small_type @small_type
  json.choice_small_type @choice_small_type

  # 脚本
  json.evaluate_script @shixun.evaluate_script
  json.standard_scripts @shixun.standrad_script
  json.choice_standard_scripts @shixun.mirror_script_id

  # 基础配置
  json.trainee @shixun.trainee
  json.can_copy @shixun.can_copy
  json.task_pass @shixun.task_pass
  json.test_set_permission @shixun.test_set_permission
  json.hide_code @shixun.hide_code # 隐藏代码窗口
  json.code_hidden @shixun.code_hidden # 代码目录隐藏
  json.vnc @shixun.vnc
  json.vnc_evaluate @shixun.vnc_evaluate
  #json.exec_time @shixun.exec_time
  json.webssh @shixun.webssh
  json.multi_webssh @shixun.multi_webssh
  json.use_scope @shixun.use_scope
  json.scope_partment @shixun.schools.map(&:name) # 公开范围
  json.opening_time @shixun.opening_time
  json.forbid_copy @shixun.forbid_copy
  json.code_edit_permission @shixun.code_edit_permission # tpi学员是否有编辑所有代码的权限
  # 私密仓库
  json.is_secret_repository @shixun.shixun_secret_repository.present?

  # 实训服务配置
  json.shixun_service_configs do
    json.array! @configs do |config|
      json.name config.mirror_repository&.name
      json.(config, :cpu_limit, :lower_cpu_limit, :memory_limit, :request_limit, :mirror_repository_id)
    end
  end
end