package com.xindazhou.message.api;

import com.xindazhou.framework.common.pojo.CommonResult;
import com.xindazhou.message.api.dto.send.MessageSendReqDTO;
import com.xindazhou.message.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import jakarta.validation.Valid;

/**
 * 消息发送 API
 *
 * @author xindazhou
 */
@FeignClient(name = ApiConstants.NAME)
@Tag(name = "RPC 服务 - 消息发送")
public interface MessageSendApi {

    String PREFIX = "/rpc-api/message/send";

    @PostMapping(PREFIX + "/send")
    @Operation(summary = "发送消息", description = "支持短信、推送、站内信等多种消息类型")
    CommonResult<Long> sendMessage(@Valid @RequestBody MessageSendReqDTO reqDTO);

}

