package com.slodon.b2b2c.socket.helpdesk.entity;

import com.corundumstudio.socketio.SocketIOClient;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.*;

/**
 * 在线vendor客服服务信息
 */
@Data
public class VendorServiceInfo {

    /**
     * vendorId
     */
    private String vendorId;


    /**
     * 正在服务的会员id列表,用于记录当前客服服务的会员数
     */
    private Set<String> memberIdList = new HashSet<>();

    /**
     * vendor socket客户端,多端登录，可能有多个客户端连接
     */
    private Map<String/*clientId*/,VendorClient> vendorClientMap = new HashMap<>();

    /**
     * 客服客户端信息
     */
    @Data
    @NoArgsConstructor
    public static class VendorClient{
        public VendorClient(SocketIOClient client) {
            this.client = client;
        }

        /**
         * socket客户端
         */
        private SocketIOClient client;

        /**
         * 正在查看的聊天窗口的会员id
         */
        private String memberId;
    }
}
