import request from '@/config/axios'

// 获取事件指标列表
export const getEventMetricList = async (params) => {
  return await request.get({ 
    url: '/menduner/reward/event-metric/page',
    params
  })
}

// 获取事件指标详情
export const getEventMetricDetails = async (id) => {
  return await request.get({ 
    url: `/menduner/reward/event-metric/get?id=${id}`
  })
}

// 删除事件指标
export const deleteEventMetric = async (id) => {
  return await request.delete({ 
    url: `/menduner/reward/event-metric/delete?id=${id}`
  })
}

// 创建事件指标
export const saveEventMetric = async (data) => {
  return await request.post({ 
    url: '/menduner/reward/event-metric/create',
    data
  })
}

// 更新事件指标
export const updateEventMetric = async (data) => {
  return await request.put({ 
    url: '/menduner/reward/event-metric/update',
    data
  })
}

// 导出事件指标表
export const downloadEventMetric = async (params) => {
  return await request.download({ url: `/menduner/reward/event-metric/export-excel`, params })
}