using MessagePack;
#if GameClient
using GameFramework;
#endif

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

        /// <summary>
        /// 推荐人 (合伙人ID 也就是成为这个人的下线)
        /// </summary>
        [Key(1)]
        public int PartnerId;

#if GameClient
        public static ClubJoinApplyRequest Create(int clubId)
        {
            ClubJoinApplyRequest request = ReferencePool.Acquire<ClubJoinApplyRequest>();
            request.ClubId = clubId;
            return request;
        }

        public override void Clear()
        {
            PartnerId = 0;
        }
#endif
    }
    
    [Message(MessageCode.ClubJoinApplyResponse)]
    [MessagePackObject]
    public class ClubJoinApplyResponse : MessageData
    {
        [Key(0)]
        public int ResultCode;

        [Key(1)]
        public int ClubId;
    }
}