import request from '@/utils/request'

// 查询能源对象事件列表
export function listEvent(query) {
  return request({
    url: '/ems/object/event/list',
    method: 'get',
    params: query
  })
}

// 查询能源对象事件详细
export function getEvent(id) {
  return request({
    url: '/ems/object/event/' + id,
    method: 'get'
  })
}

// 新增能源对象事件
export function addEvent(data) {
  return request({
    url: '/ems/object/event',
    method: 'post',
    data: data
  })
}

// 批量-新增能源对象事件
export function addEventBatch(data) {
  return request({
    url: '/ems/object/event/batch',
    method: 'post',
    data: data
  })
}

// 修改能源对象事件
export function updateEvent(data) {
  return request({
    url: '/ems/object/event',
    method: 'put',
    data: data
  })
}

// 删除能源对象事件
export function delEvent(id) {
  return request({
    url: '/ems/object/event/' + id,
    method: 'delete'
  })
}
