package com.seer.teach.netty.im.handler.mq.impl.largemodule;

import com.seer.teach.common.dto.mq.im.AiStudyDTO;
import com.seer.teach.common.enums.im.LargeModuleTopTagEnum;
import com.seer.teach.common.enums.MessagePushStatusEnums;
import com.seer.teach.netty.common.proto.MessageType;
import com.seer.teach.netty.im.handler.mq.ImLargeModuleHandler;
import com.seer.teach.netty.im.utils.ImUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 *
 * <p>
 *
 * </p >
 *
 * @author Captain
 * @since 2025-10-08 13:36
 */
@Slf4j
@Component
public class ReceiveStudyDataStreamHandler implements ImLargeModuleHandler<AiStudyDTO> {
    @Override
    public void handle(AiStudyDTO messageBody, String device) {
        ImUtils.pushSingleChatToDeviceWithAck(device, MessagePushStatusEnums.SUCCESS.getCode(), MessageType.MessageContentType.RECEIVE_STUDY_DATA_STREAM.getMsgContentType(), messageBody);
    }

    @Override
    public Class<AiStudyDTO> getType() {
        return AiStudyDTO.class;
    }

    @Override
    public String getTag() {
        return LargeModuleTopTagEnum.RECEIVE_STUDY_DATA_STREAM.getTag();
    }
}
