import request from "@/utils/request";

// 查询书屋列表
export function listRoom(query) {
  return request({
    url: "/room/room/list",
    method: "get",
    params: query,
  });
}

// 查询书屋详细
export function getRoom(id) {
  return request({
    url: "/room/room/" + id,
    method: "get",
  });
}

// 新增书屋
export function addRoom(data) {
  return request({
    url: "/room/room",
    method: "post",
    data: data,
  });
}

// 修改书屋
export function updateRoom(data) {
  return request({
    url: "/room/room",
    method: "put",
    data: data,
  });
}

// 删除书屋
export function delRoom(id) {
  return request({
    url: "/room/room/" + id,
    method: "delete",
  });
}
