package com.red.circle.console.adapter.app.activity;

import com.red.circle.console.app.dto.cmd.app.activity.invite.InviteCampaignGrantGoldCmd;
import com.red.circle.console.app.dto.cmd.app.activity.invite.InviteCampaignGrantPropsCmd;
import com.red.circle.console.app.service.app.activity.ResidentInviteActivityRewardBridgeService;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 邀请活动内部奖励桥接接口.
 */
@Validated
@RestController
@RequiredArgsConstructor
@RequestMapping("/internal/resident-activity/invite")
public class ResidentInviteActivityInternalRestController {

  private final ResidentInviteActivityRewardBridgeService rewardBridgeService;

  @PostMapping("/grant-gold")
  public void grantGold(@RequestBody @Validated InviteCampaignGrantGoldCmd cmd) {
    rewardBridgeService.grantGold(cmd);
  }

  @PostMapping("/grant-props")
  public void grantProps(@RequestBody @Validated InviteCampaignGrantPropsCmd cmd) {
    rewardBridgeService.grantProps(cmd);
  }
}
