using MessagePack;
#if GameClient
using GameFramework;
#endif

namespace GameMessage
{
    /// <summary>
    /// 俱乐部数据版本请求
    /// </summary>
    [Message(MessageCode.ClubDataVerRequest)]
    [MessagePackObject()]
    public class ClubDataVerRequest : MessageData
    {
        /// <summary>
        /// 俱乐部id
        /// </summary>
        [Key(0)] public int ClubId;
        
        #if GameClient
        public static ClubDataVerRequest Create(int clubId)
        {
            ClubDataVerRequest request = ReferencePool.Acquire<ClubDataVerRequest>();
            request.ClubId = clubId;
            return request;
        }
        #endif
    }

    /// <summary>
    /// 俱乐部数据版本响应
    /// </summary>
    [Message(MessageCode.ClubDataVerResponse)]
    [MessagePackObject()]
    public class ClubDataVerResponse : MessageData
    {
        /// <summary>
        /// 玩家自身UserId
        /// </summary>
        [Key(0)] public int Userid;

        /// <summary>
        /// 俱乐部Id
        /// </summary>
        [Key(1)] public int ClubId;

        /// <summary>
        /// 玩家自身数据版本
        /// </summary>
        [Key(2)] public ulong MyPlayerVer;

        /// <summary>
        /// 俱乐部基础信息版本
        /// </summary>
        [Key(3)] public ulong ClubBasicVer;

        /// <summary>
        /// 玩法数据版本
        /// </summary>
        [Key(4)] public ulong PlayWayVer;

        /// <summary>
        /// 桌子数据版本
        /// </summary>
        [Key(5)] public ulong DeskVer;

        /// <summary>
        /// 战斗记录版本
        /// </summary>
        [Key(6)] public ulong FightRecordVer;

        /// <summary>
        /// 所属联赛ID
        /// </summary>
        [Key(7)]
        public int LeagueId;
    }
}