import request from '@/utils/request'

// 查询消息模版列表
export function listMessage(query) {
  return request({
    url: '/system/scriptMessage/list',
    method: 'get',
    params: query
  })
}

// 查询消息模版详细
export function getMessage(id) {
  return request({
    url: '/system/scriptMessage/' + id,
    method: 'get'
  })
}

// 新增消息模版
export function addMessage(data) {
  return request({
    url: '/system/scriptMessage',
    method: 'post',
    data: data
  })
}

// 修改消息模版
export function updateMessage(data) {
  return request({
    url: '/system/scriptMessage',
    method: 'put',
    data: data
  })
}

// 删除消息模版
export function delMessage(id) {
  return request({
    url: '/system/scriptMessage/' + id,
    method: 'delete'
  })
}
