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

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

/**
 * 新增免学费批次
 * @param data
 */
export const addObj = (data: any) => {
  return request({
    url: '/stuwork/tuitionfreeterm',
    method: 'post',
    data
  });
};

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

/**
 * 编辑免学费批次
 * @param data
 */
export const editObj = (data: any) => {
  return request({
    url: '/stuwork/tuitionfreeterm/edit',
    method: 'post',
    data
  });
};

/**
 * 删除免学费批次
 * @param ids
 */
export const delObj = (ids: string[]) => {
  return request({
    url: '/stuwork/tuitionfreeterm',
    method: 'delete',
    data: ids
  });
};

