using GameMessage;
using MessagePack;

#if GameClient
using GameFramework;
#endif

namespace UnityGame
{
    [Message(MessageCode.UserNameCheckRequest)]
    [MessagePackObject()]
    public class UserNameCheckRequest : MessageData
    {
        /// <summary>
        /// 用户名
        /// </summary>
        [Key(0)] public string UserName;

#if GameClient
        public static UserNameCheckRequest Create(string userName)
        {
            UserNameCheckRequest request = ReferencePool.Acquire<UserNameCheckRequest>();
            request.UserName = userName;
            return request;
        }
#endif
    }

    [Message(MessageCode.UserNameCheckResponse)]
    [MessagePackObject()]
    public class UserNameCheckResponse : MessageData
    {
        /// <summary>
        /// 响应码
        /// </summary>
        [Key(0)] public int ResultCode;
    }
}