import request from '@/utils/request'

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

// 查询实体属性详细
export function getAttribute(attrClsId) {
  return request({
    url: '/knowledge/entityAttribute/' + attrClsId,
    method: 'get'
  })
}

// 新增实体属性
export function addAttribute(data) {
  return request({
    url: '/knowledge/entityAttribute',
    method: 'post',
    data: data
  })
}

// 修改实体属性
export function updateAttribute(data) {
  return request({
    url: '/knowledge/entityAttribute',
    method: 'put',
    data: data
  })
}

// 删除实体属性
export function delAttribute(attrClsId) {
  return request({
    url: '/knowledge/entityAttribute/' + attrClsId,
    method: 'delete'
  })
}
