package cn.axzo.msg.center.api;

import cn.axzo.msg.center.api.request.v4.MessageSendRequestV4;
import cn.axzo.msg.center.api.response.v3.MessageSendRespV3;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.validation.Valid;

/**
 * @author yanglin
 */
@Component
@FeignClient(
        value = "msg-center",
        url = "${server.serviceUrl:http://msg-center:8080}")
public interface MessageAPIV4 {

    @RequestMapping(value = "api/message/v4/send", method = RequestMethod.POST)
    MessageSendRespV3 send(@RequestBody @Valid MessageSendRequestV4 request);

}