using MessagePack;

#if GameClient
using GameFramework;
#endif

namespace GameMessage
{
    [Message(MessageCode.ClubLeagueJoinApplyRequest)]
    [MessagePackObject]
    public class ClubLeagueJoinApplyRequest : MessageData
    {
        /// <summary>
        /// 俱乐部id
        /// </summary>
        [Key(0)] public int ClubId;

        /// <summary>
        /// 联盟id
        /// </summary>
        [Key(1)] public int LeagueId;

#if GameClient
        public static ClubLeagueJoinApplyRequest Create(int clubId,int leagueId)
        {
            ClubLeagueJoinApplyRequest request = ReferencePool.Acquire<ClubLeagueJoinApplyRequest>();
            request.ClubId = clubId;
            request.LeagueId = leagueId;
            return request;
        }
#endif
    }

    [Message(MessageCode.ClubLeagueJoinApplyResponse)]
    [MessagePackObject]
    public class ClubLeagueJoinApplyResponse : MessageData
    {
        /// <summary>
        /// 结果
        /// </summary>
        [Key(0)] public int ResultCode;

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

        /// <summary>
        /// 联盟id
        /// </summary>
        [Key(2)] public int LeagueId;
    }
}