import request from '@/utils/request'

const api = {
  delRelDefect: 'testPlan/defect/delRelDefect/',
  getDefectList: 'testPlan/defect/list',
  addRelDefect: 'testPlan/defect/addRelDefect',
}

export function delRelDefect(id) {
  return request({
    url: api.delRelDefect + id,
    method: 'post',
    data: {id}
  })
}

export function getDefectList(data) {
  return request({
    url: api.getDefectList,
    method: 'get',
    params: data
  })
}

export function addRelDefect(data) {
  return request({
    url: api.addRelDefect,
    method: 'post',
    data
  })
}
