using System;

namespace JiaZhiQuan.Common.Messaging.Models
{
    public class UserAppUsageDataCollectionModel
    {

        /// <summary>
        /// uuid，用来区分是不是一次使用
        /// </summary>
        public string code { get; set; }

        /// <summary>
        /// 设备id
        /// </summary>
        public string deviceId { get; set; }

        /// <summary>
        /// 用户id
        /// </summary>
        public long userId { get; set; }

        /// <summary>
        /// 操作开始时间
        /// </summary>
        public DateTime startTime { get; set; }

        /// <summary>
        /// 操作时间（接收到数据的时间）
        /// </summary>
        public DateTime eventTime { get; set; }

        /// <summary>
        /// APP系统
        /// </summary>
        public string appOs { get; set; }

        /// <summary>
        /// APP来源
        /// </summary>
        public string appSource { get; set; }

        /// <summary>
        /// APP版本
        /// </summary>
        public string appVersion { get; set; }

        /// <summary>
        /// APP机型
        /// </summary>
        public string appModel { get; set; }

        /// <summary>
        /// IP
        /// </summary>
        public string ip { get; set; }

        /// <summary>
        /// 使用时长，秒单位
        /// </summary>
        public int usageSecond { get; set; }

        /// <summary>
        /// 数据包类型
        /// </summary>
        public PacketType packetType { get; set; }


        public enum PacketType
        {
            /// <summary>
            /// 数据包
            /// </summary>
            Packet = 0,

            /// <summary>
            /// 最后一次数据包
            /// </summary>
            LastPacket = 1
        }

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