using MessagePack;
#if GameClient
using GameFramework;
#endif

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

        /// <summary>
        /// 0 加入玩法  1创建玩法的桌子 2进入玩法的桌子
        /// </summary>
        [Key(1)] public int JoinType;

        [Key(2)] public string WayId;

        [Key(3)] public string DeskId;

        [Key(4)] public DeviceInfo DeviceInfo;

        [Key(5)] public int NowSerId;

#if GameClient
        public static ClubJoinDeskRequest Create()
        {
            return ReferencePool.Acquire<ClubJoinDeskRequest>();
        }

        public override void Clear()
        {
            ClubId = 0;
            JoinType = 0;
            WayId = null;
            DeskId = null;
            DeviceInfo = null;
            NowSerId = 0;
        }
        
#endif
    }

    [Message(MessageCode.ClubJoinDeskResponse)]
    [MessagePackObject]
    public class ClubJoinDeskResponse : MessageData
    {
        [Key(0)] public int ResultCode;

        /// <summary>
        /// 被锁在哪个游戏中
        /// </summary>
        [Key(1)] public int LockGameSerId;
    }
}