package cn.axzo.msg.center.api.v2.message.feign;

import cn.axzo.foundation.result.ApiResult;
import cn.axzo.msg.center.api.v2.message.req.SendSmsReq;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

@FeignClient(
        value = "msg-center",
        url = "${axzo.service.msg-center:http://msg-center:8080}")
public interface SmsApiV2 {

    /**
     *  发送短信消息
     */
    @PostMapping("api/message/v2/send/sms")
    ApiResult<Void> sendSms(@RequestBody @Valid SendSmsReq request);

}