import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { DemoVO, DemoForm, DemoQuery } from '@/api/demo/demo/types';

/**
 * 查询测试单列表
 * @param query
 * @returns {*}
 */
export const selectById = (id) => {
  return request({
    url: `/student/selectById/${id}`,
    method: 'get',
  });
};

/**
 * 查询测试单详细
 * @param id
 */
export const selectAll = (date) => {
  return request({
    url: '/student/selectAll',
    method: 'get',
    data:date
  });
};

/**
 * 新增测试单
 * @param data
 */
export const add = (data: DemoForm) => {
  return request({
    url: '/student/add',
    method: 'post',
    data: data
  });
};

/**
 * 修改测试单
 * @param data
 */
export const update = (data: DemoForm) => {
  return request({
    url: '/student/update',
    method: 'put',
    data: data
  });
};

/**
 * 删除测试单
 * @param id
 */
export const deleteById = (id: string | number | Array<string | number>) => {
  return request({
    url: '/student//deleteById/{id}' + id,
    method: 'delete'
  });
};
