using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Text;

namespace JiaZhiQuan.Common.Messaging.Models
{
    public enum LogType
    {
        Api = 1
    }

    public class LogRecordModel
    {

        public LogType Type { get; set; }

        public string Content { get; set; }

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

    public class ApiLogRecordSubModel
    {
        /// <summary>
        /// 耗时
        /// </summary>
        public int Milliseconds { get; set; }
        /// <summary>
        /// 全路径
        /// </summary>
        public string Url { get; set; }
        /// <summary>
        /// 参数(JSON字符串)
        /// </summary>
        public string Param { get; set; }
        /// <summary>
        /// 状态码
        /// </summary>
        public int StatusCode { get; set; }
        /// <summary>
        /// 错误信息
        /// </summary>
        public string ErrorMessage { get; set; }
        /// <summary>
        /// 用户Id，如果没有则为0
        /// </summary>
        public long UserId { get; set; }
        /// <summary>
        /// 设备Id
        /// </summary>
        public string DeviceId { get; set; }
        /// <summary>
        /// 设备信息
        /// </summary>
        public string DeviceInfo { get; set; }
        /// <summary>
        /// 渠道
        /// </summary>
        public string Channel { get; set; }
        /// <summary>
        /// IP
        /// </summary>
        public string IP { get; set; }
        /// <summary>
        /// 哪个系统
        /// </summary>
        public string System { get; set; }
        /// <summary>
        /// 记录时间
        /// </summary>
        public DateTime LogTime { get; set; } = DateTime.Now;
    }

    public class iOSDeviceInfo
    {
        public string os { get; set; }
        public string appVersoft_versionsion { get; set; }
        public string os_version { get; set; }
    }

    public class AndroidDeviceInfo
    {
        public string brand { get; set; }
        public string device { get; set; }
        public string manufacturer { get; set; }
        public string model { get; set; }
        public string os { get; set; }
        public string os_version { get; set; }
        public int sdk_int { get; set; }
        public string soft_version { get; set; }
    }
}
