using MessagePack;

#if GameClient
using GameFramework;
#endif

namespace GameMessage
{
    /// <summary>
    /// 实名认证请求
    /// </summary>
    [Message(MessageCode.RealNameAuthRequest)]
    [MessagePackObject()]
    public class RealNameAuthRequest : MessageData
    {
        /// <summary>
        /// 真实姓名
        /// </summary>
        [Key(0)] public string RealName;

        /// <summary>
        /// 身份证号码
        /// </summary>
        [Key(1)] public string CardNo;

        /// <summary>
        /// 手机号码
        /// </summary>
        [Key(2)] public string Phone;

#if GameClient
        public static RealNameAuthRequest Create()
        {
            return ReferencePool.Acquire<RealNameAuthRequest>();
        }

        public override void Clear()
        {
            RealName = null;
            CardNo = null;
            Phone = null;
        }
#endif
    }

    /// <summary>
    /// 实名认证响应
    /// </summary>
    [Message(MessageCode.RealNameAuthResponse)]
    [MessagePackObject()]
    public class RealNameAuthResponse : MessageData
    {
        /// <summary>
        /// 认证结果
        /// </summary>
        [Key(0)] public int ResultCode;
    }

    /// <summary>
    /// 实名认证信息请求
    /// </summary>
    [Message(MessageCode.RealNameInfoRequest)]
    [MessagePackObject()]
    public class RealNameInfoRequest : MessageData
    {
    }

    /// <summary>
    /// 实名认证信息响应
    /// </summary>
    [Message(MessageCode.RealNameInfoResponse)]
    [MessagePackObject()]
    public class RealNameInfoResponse : MessageData
    {
        /// <summary>
        /// 实名
        /// </summary>
        [Key(0)] public string RealName;

        /// <summary>
        /// 身份证号码
        /// </summary>
        [Key(1)] public string CardNo;
    }
}