package net.northking.cctp.device.bus.feign;

import net.northking.cctp.common.feign.FeignCctpConfig;
import net.northking.cctp.common.http.ResultWrapper;
import net.northking.cctp.device.dto.tenant.TenantDetail;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "cctp-saas", path = "/cctp-saas", configuration = {FeignCctpConfig.class})
public interface TenantFeign {

    @GetMapping(value = "/v1/tenants/{uuid}"
            , produces = MediaType.APPLICATION_JSON_UTF8_VALUE
            , consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    ResultWrapper<TenantDetail> findByPK(@PathVariable("uuid") String tenantId);

}
