import { http } from '@/utils/http/axios';

/**
 * @description: 租户列表
 */
export function tenantList(params) {
  return http.request({
    url: '/tenant/list',
    method: 'get',
    params,
  });
}

/**
 * @description: 添加租户
 */
export function addTenant(data) {
  return http.request({
    url: '/tenant/add',
    method: 'post',
    data,
  });
}

/**
 * @description: 删除租户
 */
export function deleteTenant(data) {
  return http.request({
    url: '/tenant/delete',
    method: 'post',
    data,
  });
}

/**
 * @description: 编辑租户
 */
export function editTenant(data) {
  return http.request({
    url: '/tenant/update',
    method: 'post',
    data,
  });
}

/**
 * @description: 租户详情
 */
export function tenantInfo(params) {
  return http.request({
    url: '/tenant/view',
    method: 'get',
    params,
  });
}
