import request from '@/utils/request'
//新增租户套餐
export function addTenantPackage(param) {
  return request({
    url: '/system/tenant/package',
    method: 'POST',
    data: param
  })
}
//修改租户套餐
export function saveTenantPackage(param) {
  return request({
    url: '/system/tenant/package/',
    method: 'PUT',
    data: param
  })
}
//获取租户套餐
export function detailTenantPackage(packageId) {
  return request({
    url: '/system/tenant/package/'+packageId,
    method: 'get',
  })
}
//删除租户套餐
export function deleteTenantPackage(packageId) {
  return request({
    url: '/system/tenant/package/'+packageId,
    method: 'DELETE',
  })
}
//租户套餐列表
export function getTenantPackage(param) {
  return request({
    url: '/system/tenant/package/list',
    method: 'get',
    params: param
  })
}
//同步企业方案
export function syncTenantPackage(param) {
  return request({
    url: '/system/tenant/syncTenantPackage',
    method: 'get',
    params: param
  })
}

//租户列表
export function getTenantList(param) {
  return request({
    url: '/system/tenant/list',
    method: 'get',
    params: param
  })
}

//获取租户详情
export function getTenant(id) {
  return request({
    url: '/system/tenant/'+id,
    method: 'get',
  })
}

//修改租户
export function editTenant(data) {
  return request({
    url: '/system/tenant/',
    method: 'PUT',
    data:data,
  })
}
//新增租户
export function saveTenant(data) {
  return request({
    url: '/system/tenant/',
    method: 'POST',
    data:data,
  })
}
//删除租户
export function deleteTenant(ids) {
  return request({
    url: '/system/tenant/'+ids,
    method: 'Delete',
  })
}
//租户请求企业套餐下拉
export function selectTenant(ids) {
  return request({
    url: '/system/tenant/package/selectList',
    method: 'Get',
  })
}



