import request from '@/utils/request'

export function add(sWarn, warnwaysmin, warnwaysmax) {
  return request({
    url: 'api/sWarn',
    method: 'post',
    data: {
      sWarn,
      warnwaysmin,
      warnwaysmax
    }
  })
}

export function del(id) {
  return request({
    url: 'api/sWarn/' + id,
    method: 'delete'
  })
}

export function edit(sWarn, warnwaysmin, warnwaysmax) {
  return request({
    url: 'api/sWarn',
    method: 'put',
    data: {
      sWarn,
      warnwaysmin,
      warnwaysmax
    }
  })
}

export function sWarnAll() {
  return request({
    url: 'api/sWarnNoPage',
    method: 'get'
  })
}
