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

import cn.axzo.foundation.result.ApiResult;
import cn.axzo.msg.center.api.v2.message.req.MessageSendV2Req;
import cn.axzo.msg.center.api.v2.message.resp.MessageSendV2Resp;
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 MessageApiV2 {

    @PostMapping(value = "api/message/v2/send")
    ApiResult<MessageSendV2Resp> send(@RequestBody @Valid MessageSendV2Req req);

}