package com.tashow.cloud.systemapi.api.tenant;

import com.tashow.cloud.common.pojo.CommonResult;
import com.tashow.cloud.systemapi.enums.ApiConstants;
import java.util.List;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = ApiConstants.NAME) // TODO 芋艿：fallbackFactory =
/** RPC 服务 - 多租户 */
public interface TenantApi {

  String PREFIX = ApiConstants.PREFIX + "/tenant";

  @GetMapping(PREFIX + "/id-list")
  /** 获得所有租户编号 */
  CommonResult<List<Long>> getTenantIdList();

  @GetMapping(PREFIX + "/valid")
  /** 校验租户是否合法 */
  CommonResult<Boolean> validTenant(@RequestParam("id") Long id);
}
