import request from "@/utils/request"

/** 实战业务培训 — 分页列表 */
export function listPracticalTraining(query) {
  return request({
    url: "/techService/practicalTraining/list",
    method: "get",
    params: query
  })
}

/** 详情 */
export function getPracticalTraining(id) {
  return request({
    url: "/techService/practicalTraining/" + id,
    method: "get"
  })
}

/** 新增 */
export function addPracticalTraining(data) {
  return request({
    url: "/techService/practicalTraining",
    method: "post",
    data
  })
}

/** 修改 */
export function updatePracticalTraining(data) {
  return request({
    url: "/techService/practicalTraining",
    method: "put",
    data
  })
}

/** 删除 */
export function delPracticalTraining(ids) {
  return request({
    url: "/techService/practicalTraining/" + ids,
    method: "delete"
  })
}

/** 发布 */
export function publishPracticalTraining(id) {
  return request({
    url: "/techService/practicalTraining/publish/" + id,
    method: "post"
  })
}

/** 下架 */
export function offlinePracticalTraining(id) {
  return request({
    url: "/techService/practicalTraining/offline/" + id,
    method: "post"
  })
}
