import BasicService from './BasicService';

/**
 * @desc 全局服务
 */
class GlobalService extends BasicService {
  constructor() {
    super();
  }

  changeTenantAndBaseOrg = async (data: any) => {
    return await this.post('/api/changeTenantAndBaseOrg', data);
  };

  getCurrentUser = async () => {
    return await this.get('/api/current-user');
  };

  getRoles = async () => {
    return await this.get('/api/roles');
  };

  // 获取公司
  getCompanies = async () => {
    return [];
    // return await this.get(`/api/companies`);
  };

  // 获取组织
  getOrganizations = async () => {
    return [];
    // return await this.get(`/api/organizations`);
  };

  // ===============  应用相关  ==================================
}

const globalService = new GlobalService();

export default globalService;
