import request from '@/utils/request'

// 查询传感器阈值配置列表
export function listThreshold(query) {
  return request({
    url: '/worn/threshold/list',
    method: 'get',
    params: query
  })
}

// 查询传感器阈值配置详细
export function getThreshold(id) {
  return request({
    url: '/worn/threshold/' + id,
    method: 'get'
  })
}

// 新增传感器阈值配置
export function addThreshold(data) {
  return request({
    url: '/worn/threshold',
    method: 'post',
    data: data
  })
}

// 修改传感器阈值配置
export function updateThreshold(data) {
  return request({
    url: '/worn/threshold',
    method: 'put',
    data: data
  })
}

// 删除传感器阈值配置
export function delThreshold(id) {
  return request({
    url: '/worn/threshold/' + id,
    method: 'delete'
  })
}
