import request from '@/config/axios'

// AI 评论内容VO
export interface CommentVO {
  id: number // 主键
  content: string // 具体评论
}

// AI 评论内容API
export const CommentApi = {
  // 查询AI 评论内容分页
  getCommentPage: async (params: any) => {
    return await request.get({ url: `/server/comment/page`, params })
  },

  // 查询AI 评论内容详情
  getComment: async (id: number) => {
    return await request.get({ url: `/server/comment/get?id=` + id })
  },

  // 新增AI 评论内容

  createComment: async (data: CommentVO) => {
    return await request.post({ url: `/server/comment/create`, data })
  },

  // 修改AI 评论内容

  updateComment: async (data: CommentVO) => {
    return await request.put({ url: `/server/comment/update`, data })
  },

  // 删除AI 评论内容

  deleteComment: async (id: number) => {
    return await request.delete({ url: `/server/comment/delete?id=` + id })
  },

  // 导出AI 评论内容Excel
  exportComment: async (params) => {
    return await request.download({ url: `/server/comment/export-excel`, params })
  }
}