import { http } from '@/utils/http/axios';

/**
 * @description: 列表
 */
export function getSmsTemplateList(params?) {
  return http.request({
    url: '/sms/template/page',
    method: 'GET',
    params,
  });
}

/**
 * @description: 根据ID获取详情
 */
export function getSmsTemplateDetail(id) {
  return http.request({
    url: '/sms/template/detail/' + id,
    method: 'get',
  });
}

/**
 * @description: 添加
 */
export function smsTemplateAdd(data: any) {
  return http.request({
    url: '/sms/template/add',
    method: 'POST',
    data,
  });
}

/**
 * @description: 更新
 */
export function smsTemplateUpdate(data: any) {
  return http.request({
    url: '/sms/template/update',
    method: 'PUT',
    data,
  });
}

/**
 * @description: 删除
 */
export function smsTemplateDelete(id) {
  return http.request({
    url: '/sms/template/delete/' + id,
    method: 'DELETE',
  });
}

/**
 * @description: 批量删除
 */
export function smsTemplateBatchDelete(data: any) {
  return http.request({
    url: '/sms/template/batchDelete',
    method: 'DELETE',
    data,
  });
}
