import request from '@/utils/request'

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

// 查询实体关系详细
export function getEntityRelation(relClsId) {
  return request({
    url: '/knowledge/entityRelation/' + relClsId,
    method: 'get'
  })
}

// 新增实体关系
export function addEntityRelation(data) {
  return request({
    url: '/knowledge/entityRelation',
    method: 'post',
    data: data
  })
}

// 修改实体关系
export function updateEntityRelation(data) {
  return request({
    url: '/knowledge/entityRelation',
    method: 'put',
    data: data
  })
}

// 删除实体关系
export function delEntityRelation(relClsId) {
  return request({
    url: '/knowledge/entityRelation/' + relClsId,
    method: 'delete'
  })
}
