using JiaZhiQuan.Common.Models.IM.Send;

namespace JiaZhiQuan.Common.Hubs
{
    /// <summary>
    /// 客户端发送消息的数据格式
    /// </summary>
    public class ClientSendMessageDTO
    {
        /// <summary>
        /// 聊天id
        /// </summary>
        public string ChatId { get; set; }

        /// <summary>
        /// 内容
        /// </summary>
        public MessageContentDTO Content { get; set; }

        /// <summary>
        /// 引用
        /// </summary>
        public string QuoteId { get; set; }
    }

    /// <summary>
    /// 消息体
    /// </summary>
    public class MessageContentDTO
    {
        /// <summary>
        /// 消息内容, 根据ContentType不同而不同
        /// 基类类型：BaseSendMessage
        /// </summary>
        public string Content { get; set; }

        /// <summary>
        /// 消息类型
        /// </summary>
        public MessageContentType ContentType { get; set; }
    }

    public enum MessageContentType
    {
        /// <summary>
        /// 文本：Content就是文本内容
        /// </summary>
        Text = 0,

        /// <summary>
        /// 图片：Content是ImageMessage格式的json字符串
        /// </summary>
        Image = 1,

        /// <summary>
        /// 商品：Content是GoodsMessage格式的json字符串
        /// </summary>
        Goods = 2,
        
        /// <summary>
        /// 订单：Content是OrderMessage格式的json字符串
        /// </summary>
        Order = 3,

        /// <summary>
        /// 订单待处理：Content是OrderRemindMessage格式的json字符串
        /// </summary>
        OrderRemind = 4,

        /// <summary>
        /// 售后待处理：Content是OrderRemindMessage格式的json字符串
        /// </summary>
        AfterSalesRemind = 5,
    }
}
