package com.sikey.wa04.business.domain.adapter;

import com.sikey.wa04.business.domain.entity.GroupId;
import com.sikey.wa04.business.domain.entity.GroupMember;
import com.sikey.wa04.business.domain.entity.UserId;

import java.util.List;

public interface GroupMemberAdapter {

    /**
     * 查找群成员
     *
     * @param groupId 群ID
     * @return 群成员
     */
    List<GroupMember> findMembers(GroupId groupId);


    /**
     * 加入群
     *
     * @param groupId 群ID
     * @param member  群成员
     */
    void join(GroupId groupId, GroupMember member);

    /**
     * 离开群
     *
     * @param groupId 群ID
     * @param userId  用户ID
     */
    void leave(GroupId groupId, UserId userId);

    void deleteByGroupId(String groupId);
}
