#if GameClient
using GameFramework;
#endif
using MessagePack;

namespace GameMessage
{
    [Message(MessageCode.GamePackTestRequest)]
    [MessagePackObject]
    public class GamePackTestRequest : MessageData
    {
        [Key(0)]
        public int Id;

        [Key(1)]
        public byte[] Data;

        #if GameClient
        public static GamePackTestRequest Create(int id,byte[] data = null)
        {
            GamePackTestRequest request = ReferencePool.Acquire<GamePackTestRequest>();
            request.Id = id;
            request.Data = data;
            return request;
        }

        public override void Clear()
        {
            this.Data = null;
        }
        #endif
    }

    [Message(MessageCode.GamePackTestResponse)]
    [MessagePackObject]
    public class GamePackTestResponse : MessageData
    {
        /// <summary>
        /// 响应ID
        /// </summary>
        [Key(0)]
        public int Id;

        [Key(1)]
        public byte[] Data;
    }
}