package com.tashow.cloud.systemapi.api.notify;

import com.tashow.cloud.common.pojo.CommonResult;
import com.tashow.cloud.systemapi.api.notify.dto.NotifySendSingleToUserReqDTO;
import com.tashow.cloud.systemapi.enums.ApiConstants;
import jakarta.validation.Valid;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = ApiConstants.NAME) // TODO 芋艿：fallbackFactory =
/** RPC 服务 - 站内信发送 */
public interface NotifyMessageSendApi {

  String PREFIX = ApiConstants.PREFIX + "/notify/send";

  @PostMapping(PREFIX + "/send-single-admin")
  /** 发送单条站内信给 Admin 用户 */
  CommonResult<Long> sendSingleMessageToAdmin(
      @Valid @RequestBody NotifySendSingleToUserReqDTO reqDTO);

  @PostMapping(PREFIX + "/send-single-member")
  /** 发送单条站内信给 Member 用户 */
  CommonResult<Long> sendSingleMessageToMember(
      @Valid @RequestBody NotifySendSingleToUserReqDTO reqDTO);
}
