using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hotline.Realtimes
{
    public class RealtimeConnection
    {
        public RealtimeConnection(string userId, string connectionId)
        {
            UserId = userId;
            ConnectionId = connectionId;
        }

        public string UserId { get; set; }

        public string ConnectionId { get; set; }
        
        public List<string> GroupNames { get; set; } = new();


        public bool IsInGroup(string groupName) => GroupNames.Contains(groupName);
    }
}
