import { requestClient ,fullUrl } from '#/api/request';

async function queryPage(param) {
  return requestClient.post('/auth/RobotRunRecord/queryPage', param);
}

async function queryList(param) {
  return requestClient.post('/auth/RobotRunRecord/queryList', param);
}

async function create(param) {
  return requestClient.post('/auth/RobotRunRecord/addOne', param);
}

async function removeByUid(param) {
  return requestClient.post('/auth/RobotRunRecord/removeByUid/' + param.uuid, param);
}

async function updateByUid(param) {
  return requestClient.post('/auth/RobotRunRecord/updateByUid/' + param.uuid, param);
}

async function getById(param) {
  return requestClient.post('/auth/RobotRunRecord/getById', param);
}

async function getByUuid(param) {
  return requestClient.post('/auth/RobotRunRecord/getByUuid', param);
}

/**
 * 导出全部数据URL
 */
function exportAllUrl(param) {
  return fullUrl('/auth/RobotRunRecord/export', param);
}

/**
 * 导出部分数据URL
 */
function exportPartUrl(param) {
  return fullUrl('/auth/RobotRunRecord/export', param);
}

/**
 * 下载模板URL
 */
function downloadTemplateUrl(param) {
  return fullUrl('/auth/RobotRunRecord/downloadTemplate', param);
}

/**
 * 导出全部数据
 */
async function exportAll(param) {
  return requestClient.post('/auth/RobotRunRecord/export', param);
}

/**
 * 导出部分数据
 */
async function exportPart(param) {
  return requestClient.post('/auth/RobotRunRecord/exportPart', param);
}

/**
 * 下载模板
 */
async function downloadTemplate(param) {
  return requestClient.post('/auth/RobotRunRecord/downloadTemplate', param);
}

export const robotRunRecord = {
  queryPage,
  queryList,
  create,
  removeByUid,
  updateByUid,
  getById,
  getByUuid,
  exportAllUrl,
  exportPartUrl,
  downloadTemplateUrl,
  exportAll,
  exportPart,
  downloadTemplate,
}