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

/**
 * 分页查询水电充值订单列表
 */
export const fetchList = (query?: any) => {
  return request({
    url: '/stuwork/waterorder/page',
    method: 'get',
    params: query
  });
};

/**
 * 新增水电充值订单
 */
export const addObj = (data: any) => {
  return request({
    url: '/stuwork/waterorder',
    method: 'post',
    data
  });
};

/**
 * 编辑水电充值订单
 */
export const putObj = (data: any) => {
  return request({
    url: '/stuwork/waterorder/edit',
    method: 'post',
    data
  });
};

/**
 * 删除水电充值订单
 */
export const delObjs = (ids: string[]) => {
  return request({
    url: '/stuwork/waterorder/delete',
    method: 'post',
    data: ids
  });
};

/**
 * 获取水电充值订单详情
 */
export const getObj = (id: string) => {
  return request({
    url: '/stuwork/waterorder/detail',
    method: 'get',
    params: { id }
  });
};

/**
 * 获取宿舍号列表
 */
export const getRoomList = () => {
  return request({
    url: '/stuwork/dormroom/list',
    method: 'get'
  });
};

