using MessagePack;
#if GameClient
using GameFramework;
#endif

namespace GameMessage
{
    [Message(MessageCode.ClubDoMessageRequest)]
    [MessagePackObject]
    public class ClubDoMessageRequest : MessageData
    {
        /// <summary>
        /// 消息ID
        /// </summary>
        [Key(0)]
        public int MsgId;
        
        /// <summary>
        /// 处理结果 客户端发 0表示拒绝 1表示同意 2表示取消 
        /// </summary>
        [Key(1)]
        public int DealResult;

#if GameClient
        public static ClubDoMessageRequest Create(int msgId,int dealResult)
        {
            ClubDoMessageRequest request = ReferencePool.Acquire<ClubDoMessageRequest>();
            request.MsgId = msgId;
            request.DealResult = dealResult;
            return request;
        }
#endif
    }

    [Message(MessageCode.ClubDoMessageResponse)]
    [MessagePackObject]
    public class ClubDoMessageResponse : MessageData
    {
        /// <summary>
        /// 消息ID
        /// </summary>
        [Key(0)]
        public int MsgId;

        /// <summary>
        /// 处理结果
        /// </summary>
        [Key(1)]
        public int DealResult;
        
        /// <summary>
        /// 服务器处理结果
        /// </summary>
        [Key(2)]
        public int ResultCode;

        [Key(3)]
        public string Message;
    }
}