import request from '/@/utils/request';

/**
 * 分页查询班级计划列表
 * @param query
 */
export const fetchList = (query?: any) => {
  return request({
    url: '/stuwork/classplan/page',
    method: 'get',
    params: query
  });
};

/**
 * 新增班级计划
 * @param data
 */
export const addObj = (data: any) => {
  return request({
    url: '/stuwork/classplan',
    method: 'post',
    data
  });
};

/**
 * 获取详情
 * @param id
 */
export const getDetail = (id: string) => {
  return request({
    url: '/stuwork/classplan/detail',
    method: 'get',
    params: { id }
  });
};

/**
 * 编辑班级计划
 * @param data
 */
export const editObj = (data: any) => {
  return request({
    url: '/stuwork/classplan/edit',
    method: 'post',
    data
  });
};

/**
 * 删除班级计划
 * @param ids
 */
export const delObj = (ids: string[]) => {
  return request({
    url: '/stuwork/classplan/delete',
    method: 'post',
    data: ids
  });
};

