import request from '@/config/axios'

// AI 语言种类 VO
export interface LanguageVO {
  id: number // 主键
  language: string // 语言
}

// AI 语言种类 API
export const LanguageApi = {
  // 查询AI 语言种类分页
  getLanguagePage: async (params: any) => {
    return await request.get({ url: `/server/language/page`, params })
  },

  // 查询AI 语言种类详情
  getLanguage: async (id: number) => {
    return await request.get({ url: `/server/language/get?id=` + id })
  },

  // 新增AI 语言种类
  createLanguage: async (data: LanguageVO) => {
    return await request.post({ url: `/server/language/create`, data })
  },

  // 修改AI 语言种类
  updateLanguage: async (data: LanguageVO) => {
    return await request.put({ url: `/server/language/update`, data })
  },

  // 删除AI 语言种类
  deleteLanguage: async (id: number) => {
    return await request.delete({ url: `/server/language/delete?id=` + id })
  },

  // 导出AI 语言种类 Excel
  exportLanguage: async (params) => {
    return await request.download({ url: `/server/language/export-excel`, params })
  }
}