// Generate By EToy
// Don't Edit It!!

using XGame.Framework.Database;
using XGame.Framework.Serialization;

namespace XGame.Database
{
    /// <summary> EquipmentDisassembly </summary>
    public sealed class EquipmentDisassemblyTable : ITable
    {
        long ITable.Key => Id;

        /// <summary> id </summary>
        public int Id { get; private set; }

        /// <summary> 装备品质1：白2：绿3：蓝4：紫5：黄6：橙7：红8：粉9：彩10：鎏金11：璀璨 </summary>
        public EQualityLevel Quality { get; private set; }

        /// <summary> 经验值 </summary>
        public int Exp { get; private set; }

        /// <summary> 金币 </summary>
        public int God { get; private set; }

        void ISerializable.Deserialize(IReader reader)
        {
            Id = reader.ReadInt();
            Quality = (EQualityLevel)reader.ReadInt();
            Exp = reader.ReadInt();
            God = reader.ReadInt();
        }

        void ISerializable.Serialize(IWriter writer)
        {
            writer.Write(Id);
            writer.Write((int)Quality);
            writer.Write(Exp);
            writer.Write(God);
        }
    }
}
