package com.sikey.wa04.api.websocket.client.mcDisk;

import com.sikey.wa04.business.application.service.message.McDiskMessageService;
import com.sikey.wa04.business.infrastructure.configuration.ProjectContextConstant;
import com.sikey.wa04.business.infrastructure.dto.response.messaging.MessagingPublishResponse;
import com.sikey.wa04.common.BaseController;
import com.sikey.wa04.common.dto.message.NotifyParentsSuccessfulActivationMessage;
import jakarta.annotation.Resource;
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: nelson
 * @Date: 2025/7/3
 * @Description: 移动云盘
 */
@RestController
@RequestMapping(ProjectContextConstant.MESSAGE_URL + "/messaging/publish")
public class McDiskWristwatchMessageController extends BaseController {

    @Resource
    private McDiskMessageService mcDiskMessageService;

    /**
     * 开通成功通知家长
     *
     * @param request 请求
     * @return
     */
    @PostMapping("/wristwatch/notifyParentsSuccessful/activation")
    public MessagingPublishResponse notifyParentsSuccessfulActivation(
            @Validated @RequestBody NotifyParentsSuccessfulActivationMessage request) {
        mcDiskMessageService.notifyParentsSuccessfulActivation(request);
        return new MessagingPublishResponse();
    }

    /**
     * 通知家长授权
     *
     * @param request 请求
     * @return
     */
    @PostMapping("/wristwatch/notifyParentsAuthorization")
    public MessagingPublishResponse notifyParentsAuthorization(
            @Validated @RequestBody NotifyParentsSuccessfulActivationMessage request) {
        mcDiskMessageService.notifyParentsAuthorization(request);
        return new MessagingPublishResponse();
    }

}
