package shop.alien.store.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import shop.alien.entity.result.R;
import shop.alien.entity.store.LawyerChatSession;

import java.util.List;

/**
 * 聊天会话 服务类
 *
 * @author system
 * @since 2025-01-XX
 */
public interface LawyerChatSessionService extends IService<LawyerChatSession> {

    /**
     * 分页查询聊天会话列表
     *
     * @param pageNum             页码
     * @param pageSize            页容
     * @param consultationOrderId 咨询订单ID
     * @param clientUserId        客户端用户ID
     * @param lawyerUserId        律师用户ID
     * @param status              会话状态
     * @return IPage<LawyerChatSession>
     */
    R<IPage<LawyerChatSession>> getChatSessionList(int pageNum, int pageSize, Integer consultationOrderId,
                                             Integer clientUserId, Integer lawyerUserId, Integer status);

    /**
     * 根据订单ID查询会话
     *
     * @param consultationOrderId 咨询订单ID
     * @return LawyerChatSession
     */
    LawyerChatSession getByOrderId(Integer consultationOrderId);

    /**
     * 新增聊天会话
     *
     * @param chatSession 聊天会话
     * @return R<LawyerChatSession>
     */
    R<LawyerChatSession> addChatSession(LawyerChatSession chatSession);

    /**
     * 编辑聊天会话
     *
     * @param chatSession 聊天会话
     * @return R<LawyerChatSession>
     */
    R<LawyerChatSession> editChatSession(LawyerChatSession chatSession);

    /**
     * 删除聊天会话
     *
     * @param id 主键
     * @return R<Boolean>
     */
    R<Boolean> deleteChatSession(Integer id);
}

