using MessagePack;
#if GameClient
using GameFramework;
#endif

namespace GameMessage
{
    /// <summary>
    /// 黑名单请求
    /// </summary>
    [Message(MessageCode.BlackListReportRequest)]
    [MessagePackObject]
    public class BlackListReportRequest : MessageData
    {
        /// <summary>
        /// 所属平台
        /// </summary>
        [Key(0)] public int Plat;

        /// <summary>
        /// ip地址
        /// </summary>
        [Key(1)] public string Ip;

        /// <summary>
        /// 商店类型
        /// </summary>
        [Key(2)] public string StoreType;

        /// <summary>
        /// 设备码
        /// </summary>
        [Key(3)] public string DeviceId;

        /// <summary>
        /// 地址信息
        /// </summary>
        [Key(4)] public string AddressInfo;

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

        public override void Clear()
        {
            Plat = 0;
            Ip = null;
            StoreType = null;
            DeviceId = null;
            AddressInfo = null;
        }
#endif
    }

    /// <summary>
    /// 黑名单响应
    /// </summary>
    [Message(MessageCode.BlackListReportResponse)]
    [MessagePackObject]
    public class BlackListReportResponse : MessageData
    {
        /// <summary>
        /// 是否需要退出
        /// </summary>
        [Key(0)] public bool CanQuit;
    }
}