import request from "@/utils/request"

/** 分页列表 */
export function listBreedingStandard(query) {
  return request({
    url: "/breeding/standard/list",
    method: "get",
    params: query
  })
}

/** 详情 */
export function getBreedingStandard(id) {
  return request({
    url: "/breeding/standard/" + id,
    method: "get"
  })
}

/** 新增 */
export function addBreedingStandard(data) {
  return request({
    url: "/breeding/standard",
    method: "post",
    data
  })
}

/** 修改 */
export function updateBreedingStandard(data) {
  return request({
    url: "/breeding/standard",
    method: "put",
    data
  })
}

/** 删除 */
export function delBreedingStandard(ids) {
  return request({
    url: "/breeding/standard/" + ids,
    method: "delete"
  })
}

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

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

/** 发布 */
export function publishBreedingStandard(id) {
  return request({
    url: "/breeding/standard/publish/" + id,
    method: "post"
  })
}

/** 下架 */
export function offlineBreedingStandard(id) {
  return request({
    url: "/breeding/standard/offline/" + id,
    method: "post"
  })
}
