import { del, get, post, put } from '../../http'

/**
 * @description: 邮件记录查询列表
 * @param {*} params
 * @returns {*}
 */
export const getMailboxList = async (params: Record<string, any>) => {
  return await get<any>('/systemMessageRecord/list', params)
}

/**
 * @description: 发送邮件
 * @param {*} data
 * @returns {*}
 */
export const sendMailbox = async (data: Record<string, any>) => {
  return await post<any>('/systemMessageRecord', data)
}

/**
 * @description: 通过id删除邮件
 * @param {*} id
 * @returns {*}
 */
export const deleteMailbox = async (id: string) => {
  return await del(`systemMessageRecord/${id}`)
}

/**
 * @description: 更新邮件
 * @param {*} id
 * @returns {*}
 */
export const putMailbox = async (data: Record<string, any>) => {
  return await put('systemMessageRecord', data)
}
