package com.lesingle.modules.sys.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lesingle.common.result.PageResult;
import com.lesingle.modules.sys.dto.CreateTenantDto;
import com.lesingle.modules.sys.dto.UpdateTenantDto;
import com.lesingle.modules.sys.entity.SysTenant;

import java.util.Map;

public interface ISysTenantService extends IService<SysTenant> {

    Map<String, Object> createTenant(CreateTenantDto dto, Long currentTenantId);

    PageResult<Map<String, Object>> findAll(Long page, Long pageSize, String keyword, String tenantType);

    Map<String, Object> findDetail(Long id);

    SysTenant updateTenant(Long id, UpdateTenantDto dto, Long currentTenantId);

    void toggleStatus(Long id, Long currentTenantId);

    void removeTenant(Long id, Long currentTenantId);

    SysTenant getMyTenant(Long tenantId);

    void updateMyTenant(Long tenantId, String name, String description);

    /** 检查是否为超级租户 */
    boolean isSuperTenant(Long tenantId);
}
