import request from '@/utils/request'

export function getContactRecordList(query) {
  return request({
    url: '/plan/contactrecord/',
    method: 'get',
    params: query
  })
}

export function createContactRecord(data) {
  return request({
    url: '/plan/contactrecord/',
    method: 'post',
    data
  })
}

export function deleteContactRecord(id) {
  return request({
    url: `/plan/contactrecord/${id}/`,
    method: 'delete'
  })
}


export function updateContactRecord(id, data) {
  return request({
    url: `/plan/contactrecord/${id}/`,
    method: 'put',
    data
  })
}

export function getContactRecord(id) {
  return request({
    url: `/plan/contactrecord/${id}/`,
    method: 'get',
  })
}

export function getPlanList(query) {
  return request({
    url: '/plan/plan/',
    method: 'get',
    params: query
  })
}

export function createPlan(data) {
  return request({
    url: '/plan/plan/',
    method: 'post',
    data
  })
}

export function deletePlan(id) {
  return request({
    url: `/plan/plan/${id}/`,
    method: 'delete'
  })
}


export function updatePlan(id, data) {
  return request({
    url: `/plan/plan/${id}/`,
    method: 'put',
    data
  })
}

export function getPlan(id) {
  return request({
    url: `/plan/plan/${id}/`,
    method: 'get',
  })
}
