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

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

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

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

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

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

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