import request from '@/utils/request'

// 查询规则列表
export function listRule(query) {
  return request({
    url: '/kpi/sync_rule-media/page',
    method: 'get',
    params: query
  })
}

// 删除规则
export function delRule(id) {
  return request({
    url: '/kpi/sync_rule-media/delete/' + id,
    method: 'get'
  })
}

// 新增规则
export function addRule(data) {
  return request({
    url: '/kpi/sync_rule-media/batch-insert',
    method: 'post',
    data
  })
}

// 保存规则
export function saveRule(data) {
  return request({
    url: '/kpi/sync_rule-media/save',
    method: 'post',
    data
  })
}