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

import net.northking.cctp.common.http.ResultWrapper;
import net.northking.cctp.mobile.dto.device.DeviceInfoDto;
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-device-mgr", path = "/cctp-device-mgr")
public interface DeviceMgrFeignClient {

    @GetMapping(value = "/pub/device/release/{token}", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    ResultWrapper<Boolean> deviceRelease(@PathVariable("token") String token);

    @GetMapping(value = "/pub/device/lock/{uuid}", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    ResultWrapper<DeviceInfoDto> getLock(@PathVariable("uuid") String uuid);

    //根据deviceToken获取deviceId
    @GetMapping(value = "/pub/device/info/{token}", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    ResultWrapper<DeviceInfoDto> getDeviceInfoByToken(@PathVariable("token") String token);


}
