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

/**
 * @description: 获取词根列表
 * @param {*} params
 * @return {*}
 */
export const getWordRootList = async (params: Record<string, any>) => {
  return await get<any>('/wordRoot/list', params)
}

/**
 * @description: 词根新增
 * @param {*} data
 * @return {*}
 */
export const addWordRoot = async (data: Record<string, any>) => {
  return await post<any>('/wordRoot', data)
}

/**
 * @description: 词根更新
 * @param {*} data
 * @return {*}
 */
export const updateWordRoot = async (data: Record<string, any>) => {
  return await put('/wordRoot', data)
}

/**
 * @description: 词根删除
 * @param {*} data
 * @return {*}
 */
export const deleteWordRoot = async (id: string) => {
  return await del(`/wordRoot/${id}`)
}
