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

/**
 * 分页查询助学金申请批次列表
 * @param query
 */
export const fetchList = (query?: any) => {
  return request({
    url: '/stuwork/stipendtermbatch/page',
    method: 'get',
    params: query
  });
};

/**
 * 新增助学金申请批次
 * @param data
 */
export const addObj = (data: any) => {
  return request({
    url: '/stuwork/stipendtermbatch',
    method: 'post',
    data
  });
};

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

/**
 * 编辑助学金申请批次
 * @param data
 */
export const editObj = (data: any) => {
  return request({
    url: '/stuwork/stipendtermbatch/edit',
    method: 'post',
    data
  });
};

/**
 * 删除助学金申请批次
 * @param ids
 */
export const delObj = (ids: string[]) => {
  return request({
    url: '/stuwork/stipendtermbatch/delete',
    method: 'post',
    data: ids
  });
};

