using System;
using MemoryPack;

namespace Com.Project.B.Authorize
{
    /// <summary>
    /// 授权数据
    /// </summary>
    public interface IAuthorizeData
    {
        /// <summary>
        /// 链接ID,仅用于网络通讯
        /// </summary>
        int ConnectionId { get; set; }
        /// <summary>
        /// 玩家ID
        /// </summary>
        Guid PlayerId { get; }
        /// <summary>
        /// 授权令牌
        /// </summary>
        string Token { get; }
        /// <summary>
        /// 上次更新时间
        /// </summary>
        DateTime LastUpdateTime { get; }
    }
    [MemoryPackable]
    public partial struct AuthorizeData:IAuthorizeData
    {
        public int ConnectionId { get; set; }
        public Guid PlayerId { get; set; }
        public string Token { get; set; }
        public DateTime LastUpdateTime { get; set; }
    }
}