import request from "@/utils/request";

// 查询设备数据保存策略列表
export function listTspolicy(query) {
  return request({
    url: "/iot/tspolicy/list",
    method: "get",
    params: query
  });
}

// 查询设备数据保存策略详细
export function getTspolicy(policyId) {
  return request({
    url: "/iot/tspolicy/" + policyId,
    method: "get"
  });
}

// 新增设备数据保存策略
export function addTspolicy(data) {
  return request({
    url: "/iot/tspolicy",
    method: "post",
    data: data
  });
}

// 修改设备数据保存策略
export function updateTspolicy(data) {
  return request({
    url: "/iot/tspolicy",
    method: "put",
    data: data
  });
}

// 删除设备数据保存策略
export function delTspolicy(policyId, tid) {
  return request({
    url: "/iot/tspolicy/" + policyId + "/" + tid,
    method: "delete"
  });
}
