import request from '@/utils/request'
//客户
export function getCustomerList(query) {
  return request({
    url: '/sam/customer/',
    method: 'get',
    params: query
  })
}
export function createCustomer(data) {
  return request({
    url: '/sam/customer/',
    method: 'post',
    data
  })
}
export function updateCustomer(id, data) {
  return request({
    url: `/sam/customer/${id}/`,
    method: 'put',
    data
  })
}
export function deleteCustomer(id, data) {
  return request({
    url: `/sam/customer/${id}/`,
    method: 'delete',
    data
  })
}
//合同
export function getContractList(query) {
  return request({
    url: '/sam/contract/',
    method: 'get',
    params: query
  })
}
export function createContract(data) {
  return request({
    url: '/sam/contract/',
    method: 'post',
    data
  })
}
export function updateContract(id, data) {
  return request({
    url: `/sam/contract/${id}/`,
    method: 'put',
    data
  })
}
export function deleteContract(id, data) {
  return request({
    url: `/sam/contract/${id}/`,
    method: 'delete',
    data
  })
}
