package com.red.circle.other.app.inner.endpoint.material.props;

import com.red.circle.framework.dto.ResultResponse;
import com.red.circle.other.inner.model.cmd.material.PropCouponGrantCmd;
import com.red.circle.other.app.service.PropCouponService;
import com.red.circle.other.inner.endpoint.material.props.api.PropCouponClientApi;
import com.red.circle.other.inner.endpoint.material.props.api.PropsRedPacketSkinClientApi;
import lombok.RequiredArgsConstructor;
import org.springframework.http.MediaType;
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;

/**
 * 道具券内部端点
 *
 * @author system
 * @date 2025-11-07
 */
@Validated
@RestController
@RequestMapping(value = PropCouponClientApi.API_PREFIX, produces = MediaType.APPLICATION_JSON_VALUE)
@RequiredArgsConstructor
public class PropCouponClientEndpoint implements PropCouponClientApi {

    private final PropCouponService propCouponService;

    @Override
    public ResultResponse<Void> grantCoupons(PropCouponGrantCmd cmd) {
        propCouponService.grantCoupons(cmd);
      return ResultResponse.success();
    }
}
