package com.ruoyi.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.RestResponse;
import com.ruoyi.system.domain.SysTenant;
import com.ruoyi.system.domain.vo.ReqBusinessAddTenant;
import com.ruoyi.system.domain.vo.ReqSearchSysTenant;

import java.util.List;

public interface SysTenantService  extends IService<SysTenant> {

    /**
     * 用户租户列表
     * @param userId
     * @param limitTenantUserId
     * @return
     */
    List<SysTenant> selectUserTenantList(String userId, String limitTenantUserId);

    /**
     * 校验用户所属租户是否在用生效
     * @param userId
     * @param tenantId
     * @return
     */
    boolean checkUserTenantInUse(String userId,String tenantId);

    RestResponse searchList(ReqSearchSysTenant reqSearchSysTenant);
    RestResponse treeSelect();
    RestResponse detailById(Long tenantId);
    RestResponse addTenant(ReqBusinessAddTenant reqBusinessAddTenant);
    RestResponse updateTenant(SysTenant sysTenant);
    RestResponse deleteById(String[] tenantIds);
    int expireTenant();
}
