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

namespace CrazyStudio.Core.Common.Redis.Dto
{
    [MessagePackObject]
    public struct ClusterMessage
    {
        /// <summary>
        /// 集群ID
        /// </summary>
        [Key(0)]
        public ushort MsgType { get; set; }

        /// <summary>
        /// 连接ID
        /// </summary>
        [Key(1)]
        public string ConnectionId { get; set; } = string.Empty;

        /// <summary>
        /// 转发的数据
        /// </summary>
        [Key(2)]
        public byte[]? MsgContent { get; set; } = default;

        /// <summary>
        /// 不发送的连接ID
        /// </summary>
        [Key(3)]
        public HashSet<string> ExceptIds { get; set; } = new HashSet<string>();
        public ClusterMessage()
        {
        }
    }
}
