package cn.sikey.mcdisk.feign;

import cn.sikey.mcdisk.entity.GetPhoneNumberRequest;
import cn.sikey.mcdisk.entity.GetPhoneNumberResponse;
import cn.sikey.mcdisk.feign.fallback.ApiChildFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author: nelson
 * @Date: 2025/5/29
 * @Description: 儿童feign
 */
@FeignClient(value = "api-user", path = "/api/v2/userctx/user/child", fallbackFactory = ApiChildFallbackFactory.class)
public interface ApiChildFeignService {

    /**
     * 获取手机号
     *
     * @param request 获取手机号
     * @return
     */
    @PostMapping("/getPhoneNumber")
    GetPhoneNumberResponse getPhoneNumber(@Validated @RequestBody GetPhoneNumberRequest request);

}
