package com.keao.edu.im.service;

import io.rong.models.Result;
import io.rong.models.conversation.ConversationModel;
import io.rong.models.group.GroupModel;
import io.rong.models.group.UserGroup;

import java.util.List;

public interface GroupService {

    //群组模块   群组
    Result groupSync(UserGroup userGroup) throws Exception;

    Result groupCreate(GroupModel groupModel) throws Exception;

    Result groupGet(GroupModel groupModel) throws Exception;

    Result groupUpdate(GroupModel groupModel) throws Exception;

    Result groupJoin(GroupModel groupModel) throws Exception;

    Result groupQuit(GroupModel groupModel) throws Exception;

    Result groupDismiss(GroupModel groupModel) throws Exception;


    //成员禁言
    Result muteMembersAdd(GroupModel groupModel) throws Exception;

    Result muteMembersRemove(GroupModel groupModel) throws Exception;

    Result muteMembersGetList(String groupId) throws Exception;


    //整体禁言
    Result muteAllMembersAdd(String[] groupIds) throws Exception;

    Result muteAllMembersRemove(String[] groupIds) throws Exception;

    Result muteAllMembersGetList() throws Exception;


    //群禁言用户白名单服务
    Result muteWhiteAdd(GroupModel groupModel) throws Exception;

    Result muteWhiteRemove(GroupModel groupModel) throws Exception;

    Result muteWhiteGetList(String groupId) throws Exception;



    //会话模块   会话
    Result conversationMute(ConversationModel conversationModel) throws Exception;

    Result conversationUnmute(ConversationModel conversationModel) throws Exception;

    Result conversationGet(ConversationModel conversationModel) throws Exception;

    /**
     * 初始化群数据
     * @return
     */
    void batchCreate(List<GroupModel> groupModels);

    /**
     * 批量解散
     * @param groupModels
     */
    void groupBatchDismiss(List<GroupModel> groupModels);

    /**
     * 批量退团
     * @param groupModels
     */
    void groupBatchQuit(List<GroupModel> groupModels);
}
