import request from "@/utils/request"

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

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

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

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

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

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

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

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

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