import request from '@/utils/request'

// 查询用户扩展列表
export function listExt(query) {
  return request({
    url: '/system/ext/list',
    method: 'get',
    params: query
  })
}

// 查询用户扩展详细
export function getExt(extId) {
  return request({
    url: '/system/ext/' + extId,
    method: 'get'
  })
}

// 新增用户扩展
export function addExt(data) {
  return request({
    url: '/system/ext',
    method: 'post',
    data: data
  })
}

// 修改用户扩展
export function updateExt(userId, status) {
  const data = {
    userId,
    status
  }
  return request({
    url: '/system/ext',
    method: 'put',
    data: data
  })
}

// 删除用户扩展
export function delExt(extId) {
  return request({
    url: '/system/ext/' + extId,
    method: 'delete'
  })
}
