import request from '@/utils/request'

// 查询场景信息列表
export function listScene(query) {
  return request({
    url: '/business/scene/list',
    method: 'get',
    params: query
  })
}

// 查询场景信息详细
export function getScene(sceneId) {
  return request({
    url: '/business/scene/' + sceneId,
    method: 'get'
  })
}

// 新增场景信息
export function addScene(data) {
  return request({
    url: '/business/scene',
    method: 'post',
    data: data
  })
}

// 修改场景信息
export function updateScene(data) {
  return request({
    url: '/business/scene',
    method: 'put',
    data: data
  })
}

// 删除场景信息
export function delScene(sceneId) {
  return request({
    url: '/business/scene/' + sceneId,
    method: 'delete'
  })
}
//查询类型名称与类型id
export function getSceneModeName(){
  return request({
    url:'business/sceneMode/list',
    method:'get'
  })
}
//查询租户id与名称
export function getTenantName() {
  return request({
    url: '/business/tenant/tenantIdAndName',
    method: 'get'
  })
}
//获取当前用户是否为admin
export function getIsNeedTenant(){
  return request({
    url:'/business/scene/isAdmin',
    method:'get'
  })
}
//创建时序数据库
export function createTdeDb(data){
  return request({
    url:'/tdengine/tdengine/createDatabase',
    method:'post',
    data: data
  })
}


