using Server.Core;

namespace Server.Net
{
    /// <summary>
    /// 会话用户数据  -- 这个还不能使用线程池，找不准释放的机会
    /// </summary>
    public class SessionUserData
    {
        /// <summary>
        /// 玩家的Userid;
        /// </summary>
        public int Userid
        {
            get;
            private set;
        }

        /// <summary>
        /// 会话Uuid
        /// </summary>
        public string Uuid
        {
            get;
            private set;
        }

        /// <summary>
        /// 客户端版本
        /// </summary>
        public int ClientVer
        {
            get;
            private set;
        }

        /// <summary>
        /// 0桌面模式 1安卓平台 2苹果平台 3小游戏 4WebGl
        /// </summary>
        public int Plat
        {
            get;
            private set;
        }

        /// <summary>
        /// 设备信息
        /// </summary>
        public string DeviceInfo
        {
            get;
            private set;
        }

        /// <summary>
        /// 是否是新用户
        /// </summary>
        public bool IsNewUser
        {
            get;
            private set;
        }

        /// <summary>
        /// 商店类型
        /// </summary>
        public string StoreType
        {
            get;
            private set;
        }

        public static SessionUserData Create(int userid,string uuid,int clientVer,int plat,string deviceInfo,bool isNewUser,string storeType)
        {
            SessionUserData data = new SessionUserData();
            data.Userid = userid;
            data.Uuid = uuid;
            data.ClientVer = clientVer;
            data.Plat = plat;
            data.DeviceInfo = deviceInfo;
            data.IsNewUser = isNewUser;
            data.StoreType = storeType;
            return data;
        }

        // public override void Dispose()
        // {
        //     Uuid = null;
        //     DeviceInfo = null;
        // }
    }
}