import request from "@/utils/request";

// 查询物模型列表
export function listModel(query) {
  return request({
    url: "/thingsmodel/model/list",
    method: "get",
    params: query,
  });
}

// 查询物模型详细
export function getModel(modelId) {
  return request({
    url: "/thingsmodel/model/" + modelId,
    method: "get",
  });
}

// 新增物模型
export function addModel(data) {
  return request({
    url: "/thingsmodel/model",
    method: "post",
    data: data,
  });
}

// 修改物模型
export function updateModel(data) {
  return request({
    url: "/thingsmodel/model",
    method: "put",
    data: data,
  });
}

// 删除物模型
export function delModel(modelId) {
  return request({
    url: "/thingsmodel/model/" + modelId,
    method: "delete",
  });
}
