import request from '@/utils/request'

export function listDbConfig(query) {
  return request({
    url: '/admin/dbConfig/list',
    method: 'get',
    params: query
  })
}

export function getDbConfig(id) {
  return request({
    url: '/admin/dbConfig/' + id,
    method: 'get'
  })
}

export function addDbConfig(data) {
  return request({
    url: '/admin/dbConfig',
    method: 'post',
    data: data
  })
}

export function updateDbConfig(data) {
  return request({
    url: '/admin/dbConfig',
    method: 'put',
    data: data
  })
}

export function delDbConfig(ids) {
  return request({
    url: '/admin/dbConfig/' + ids,
    method: 'delete'
  })
}

export function getAvailableDbConfig() {
  return request({
    url: '/admin/dbConfig/available',
    method: 'get'
  })
}
