using JiaZhiQuan.Common.Hubs;
using System.Collections.Generic;

namespace JiaZhiQuan.Common.Messaging.Models
{
    /// <summary>
    /// 发送信息到客户端
    /// </summary>
    public class SendMessageToClientModel
    {
        /// <summary>
        /// 消息类型
        /// </summary>
        public SendMessageType MessageType { get; set; }

        /// <summary>
        /// 消息内容
        /// SendMessageType.Private: List<PrivateMessage>, 批量私发
        /// SendMessageType.All: string, 像所有用户发送的内容
        /// </summary>
        public string Content { get; set; }

        public static string GetMsgKey()
        {
            return "JZQ_Send_Message_Client";
        }
    }

    /// <summary>
    /// 私发消息的内容
    /// </summary>
    public class PrivateMessage
    {
        public long UserId { get; set; }

        public ServerResultDTO Message { get; set; }
    }

    public enum SendMessageType
    {
        /// <summary>
        /// 私发
        /// </summary>
        Private,

        /// <summary>
        /// 全部
        /// </summary>
        All
    }
}
