import request from '@/utils/request'

// 查询实体列表
export function listEntity(query) {
  return request({
    url: '/knowledge/entity/list',
    method: 'get',
    params: query
  })
}

// 查询实体详细
export function getEntity(entId) {
  return request({
    url: '/knowledge/entity/' + entId,
    method: 'get'
  })
}

// 新增实体
export function addEntity(data) {
  return request({
    url: '/knowledge/entity',
    method: 'post',
    data: data
  })
}

// 修改实体
export function updateEntity(data) {
  return request({
    url: '/knowledge/entity',
    method: 'put',
    data: data
  })
}

// 删除实体
export function delEntity(entId) {
  return request({
    url: '/knowledge/entity/' + entId,
    method: 'delete'
  })
}
