import request from '@/utils/request'

export function get(dictName) {
  const params = {
    dictName,
    page: 0,
    size: 9999
  }
  return request({
    url: 'api/apiDictDetail',
    method: 'get',
    params
  })
}

export function getDictMap(dictName) {
  const params = {
    dictName,
    page: 0,
    size: 9999
  }
  return request({
    url: 'api/apiDictDetail/map',
    method: 'get',
    params
  })
}

export function add(data) {
  return request({
    url: 'api/apiDictDetail',
    method: 'post',
    data
  })
}

export function del(id) {
  return request({
    url: 'api/apiDictDetail/' + id,
    method: 'delete'
  })
}

export function edit(data) {
  return request({
    url: 'api/ApiDictDetail',
    method: 'put',
    data
  })
}

export default { add, edit, del }
