package com.snack.server.module.chat.service;

import com.snack.server.module.chat.dto.req.ChatAckReq;
import com.snack.server.module.chat.dto.req.ChatSendMessageReq;
import com.snack.server.module.chat.vo.ChatMessageVO;
import com.snack.server.module.chat.entity.ChatMessage;

import java.util.List;

/**
 * 客服消息服务
 */
public interface ChatMessageService {

    ChatMessage sendMessage(ChatSendMessageReq req, Long senderId, Integer senderType);

    void handleAck(ChatAckReq req, boolean isAdmin);

    List<ChatMessageVO> getMessages(Long sessionId, Long afterSeq, int limit);

    List<ChatMessageVO> getMessagesSince(Long sessionId, Long lastAckSeq);

    ChatMessageVO recallMessage(Long sessionId, Long messageId, Long operatorId, boolean isAdmin);

    ChatMessageVO toVO(ChatMessage msg);
}
