using MessagePack;
#if GameClient
using GameFramework;
#endif

namespace GameMessage
{
    [Message(MessageCode.GameCenter_TestRequest)]
    [MessagePackObject]
    public class MessageTestRequest : MessageData
    {
        [Key(0)] public int abc;

        [Key(1)] public int sendTime;
    }

    [Message(MessageCode.GameCenter_TestResponse)]
    [MessagePackObject]
    public class MessageTestResponse : MessageData
    {
        [Key(0)] public int bbb;

        [Key(1)] public int sendTime;
    }

    [Message(MessageCode.GameTestTaskIdRequest)]
    [MessagePackObject]
    public class GameTestTaskIdRequest : MessageData
    {
        /// <summary>
        /// 测试的用户名
        /// </summary>
        [Key(0)] public string UserName;

#if GameClient
        public static GameTestTaskIdRequest Create(string userName)
        {
            GameTestTaskIdRequest request = ReferencePool.Acquire<GameTestTaskIdRequest>();
            request.UserName = userName;
            return request;
        }

        public override void Clear()
        {
            UserName = null;
        }
#endif
    }

    [Message(MessageCode.GameTestTaskIdResponse)]
    [MessagePackObject]
    public class GameTestTaskIdResponse : MessageData
    {
        /// <summary>
        /// 测试任务ID
        /// </summary>
        [Key(0)] public int TestId;
    }
}