using MessagePack;
#if GameClient
using GameFramework;
#endif

namespace GameMessage
{
    [Message(MessageCode.MiniGameTokenRequest)]
    [MessagePackObject]
    public class MiniGameTokenRequest : MessageData
    {
#if GameClient
        public static MiniGameTokenRequest Create()
        {
            return ReferencePool.Acquire<MiniGameTokenRequest>();
        }
#endif
    }
    
    [Message(MessageCode.MiniGameTokenResponse)]
    [MessagePackObject()]
    public class MiniGameTokenResponse : MessageData
    {
        /// <summary>
        /// Token
        /// </summary>
        [Key(0)]
        public string AccessToken;

        /// <summary>
        /// 有效期
        /// </summary>
        [Key(1)]
        public int ExpiresTime;
    }
}