package cn.axzo.msg.center.api;

import cn.axzo.msg.center.api.request.v3.MessageSendReqV3;
import cn.axzo.msg.center.api.response.v3.MessageSendRespV3;
import cn.azxo.framework.common.model.CommonResponse;
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 MessageAPIV3 {

    @RequestMapping(value = "api/message/v3/send", method = RequestMethod.POST)
    CommonResponse<MessageSendRespV3> send(@RequestBody @Valid MessageSendReqV3 req);

}