import request from '@/utils/request'

// 查询技师管理列表
export function listMechanic(query) {
  return request({
    url: '/business/mechanic/list',
    method: 'get',
    params: query
  })
}

export function listMechanicAudit(query) {
  return request({
    url: '/business/mechanic/audit/list',
    method: 'get',
    params: query
  })
}


// 查询技师管理详细
export function getMechanic(id) {
  return request({
    url: '/business/mechanic/' + id,
    method: 'get'
  })
}

// 新增技师管理
export function addMechanic(data) {
  return request({
    url: '/business/mechanic',
    method: 'post',
    data: data
  })
}

// 修改技师管理
export function updateMechanic(data) {
  return request({
    url: '/business/mechanic',
    method: 'put',
    data: data
  })
}

export function auditMechanicAvatar(data) {
  return request({
    url: '/business/mechanic/avatar/audit',
    method: 'put',
    data: data
  })
}

export function auditMechanic(data) {
  return request({
    url: '/business/mechanic/audit',
    method: 'put',
    data: data
  })
}

export function createEvaluation(params) {
  return request({
    url: '/business/mechanic/createEvaluation',
    method: 'get',
    params: params
  })
}

export function updateAppType(params) {
  return request({
    url: '/business/mechanic/updateAppType',
    method: 'get',
    params: params
  })
}

// 删除技师管理
export function delMechanic(id) {
  return request({
    url: '/business/mechanic/' + id,
    method: 'delete'
  })
}

// 删除技师管理
export function batchUpdateMechanicServiceStatus(data) {
  return request({
    url: '/business/mechanic/batchUpdateMechanicServiceStatus',
    method: 'post',
    data
  })
}
