import request from '@/utils/request'

// 创建医生信息
export function createDoctor(data) {
  return request({
    url: '/system/doctor/create',
    method: 'post',
    data: data
  })
}

// 更新医生信息
export function updateDoctor(data) {
  return request({
    url: '/system/doctor/update',
    method: 'put',
    data: data
  })
}

// 删除医生信息
export function deleteDoctor(id) {
  return request({
    url: '/system/doctor/delete?id=' + id,
    method: 'delete'
  })
}

// 获得医生信息
export function getDoctor(id) {
  return request({
    url: '/system/doctor/get?id=' + id,
    method: 'get'
  })
}

// 获得医生信息分页
export function getDoctorPage(query) {
  return request({
    url: '/system/doctor/page',
    method: 'get',
    params: query
  })
}

// 导出医生信息 Excel
export function exportDoctorExcel(query) {
  return request({
    url: '/system/doctor/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
