using MessagePack;

namespace GameMessage
{
    [Message(MessageCode.AccountPrivateInfoRequest)]
    [MessagePackObject]
    public class AccountPrivateInfoRequest : MessageData
    {
#if GameClient
        public static AccountPrivateInfoRequest Create()
        {
            return GameFramework.ReferencePool.Acquire<AccountPrivateInfoRequest>();
        }
#endif
    }
    
    [Message(MessageCode.AccountPrivateInfoResponse)]
    [MessagePackObject]
    public class AccountPrivateInfoResponse : MessageData
    {
        [Key(0)]public int ResultCode; 
        [Key(1)]public string PhoneNumber; 
    }
    

    [Message(MessageCode.AccountBindRequest)]
    [MessagePackObject]
    public class AccountBindRequest : MessageData
    {
        /// <summary>
        /// 绑定类型
        /// </summary>
        [Key(0)]public AccountBindType BindType;
        /// <summary>
        /// 绑定的账号
        /// </summary>
        [Key(1)]public string BindAccount;
        /// <summary>
        /// 绑定账号验证凭证
        /// </summary>
        [Key(2)]public string BindVerifyCode;
        
#if GameClient
        public static AccountBindRequest Create()
        {
            return GameFramework.ReferencePool.Acquire<AccountBindRequest>();
        }
#endif
    }
    
    [Message(MessageCode.AccountBindResponse)]
    [MessagePackObject]
    public class AccountBindResponse : MessageData
    {
        [Key(0)]public int ResultCode; 
    }

    /// <summary>
    /// 账号绑定类型
    /// </summary>
    public enum AccountBindType
    {
        None = 0,
        Phone = 1, // 手机绑定
    }
}