import request from "@/utils/request"

/** 综合牧业知识库 — 分页列表 */
export function listKnowledge(query) {
  return request({
    url: "/techService/knowledge/list",
    method: "get",
    params: query
  })
}

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

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

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

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

/** 同步知识库 */
export function syncKbKnowledge(id) {
  return request({
    url: "/techService/knowledge/syncKb/" + id,
    method: "post"
  })
}

/** 移出知识库 */
export function removeKbKnowledge(id) {
  return request({
    url: "/techService/knowledge/removeKb/" + id,
    method: "post"
  })
}
