import request from "@/utils/request"

/** 生长与出栏标准 — 分页列表 */
export function listGrowthSlaughterStandard(query) {
  return request({
    url: "/growthSlaughter/standard/list",
    method: "get",
    params: query
  })
}

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

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

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

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

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

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

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

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