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

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

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

        /// <summary> 20000+类型*100+品质*10+序号 </summary>
        public int Id { get; private set; } // sc

        public string Name { get; private set; } // c

        public string Icon { get; private set; } // c

        public string Desc { get; private set; } // c

        /// <summary>  1：剑 2：锤 3：斧 4：匕首 5：法杖 </summary>
        public int Type { get; private set; } // sc

        /// <summary> 1:白2：绿3：蓝4：紫5：橙6：红7：彩 </summary>
        public int Quality { get; private set; } // sc

        /// <summary> 0：无1：活动 </summary>
        public int Label { get; private set; } // c

        /// <summary> 属性名称1，属性值，属性名称2，属性值…… </summary>
        public int[] Base_attr { get; private set; } // sc

        /// <summary> 技能id </summary>
        public int Skill { get; private set; } // sc

        /// <summary> 属性名称1，属性值，属性名称2，属性值…… </summary>
        public int[] Own_attr { get; private set; } // sc

        /// <summary> 模型 </summary>
        public string Model { get; private set; } // c

        /// <summary> 尺寸 </summary>
        public float Size { get; private set; } // c

        void ISerializable.Deserialize(IReader reader)
        {
            Id = reader.ReadInt();
            Name = reader.ReadString();
            Icon = reader.ReadString();
            Desc = reader.ReadString();
            Type = reader.ReadInt();
            Quality = reader.ReadInt();
            Label = reader.ReadInt();
            Base_attr = reader.ReadEnumerable<int[]>();
            Skill = reader.ReadInt();
            Own_attr = reader.ReadEnumerable<int[]>();
            Model = reader.ReadString();
            Size = reader.ReadFloat();
        }

        void ISerializable.Serialize(IWriter writer)
        {
            writer.Write(Id);
            writer.Write(Name);
            writer.Write(Icon);
            writer.Write(Desc);
            writer.Write(Type);
            writer.Write(Quality);
            writer.Write(Label);
            writer.Write(Base_attr);
            writer.Write(Skill);
            writer.Write(Own_attr);
            writer.Write(Model);
            writer.Write(Size);
        }
    }
}
