import service from '@/utils/request'

export const queryAllRegions = () => {
  return service({
    url: '/region/queryAllRegions',
    method: 'get'
  })
}

export const createRegion = (data) => {
  return service({
    url: '/region/createRegion',
    method: 'post',
    data
  })
}

export const updateRegion = (data) => {
  return service({
    url: '/region/updateRegion',
    method: 'put',
    data
  })
}

export const deleteRegion = (id) => {
  return service({
    url: `/region/deleteRegion?id=${id}`,
    method: 'delete'
  })
}
