//------------------------------------------------------------------------------ // // This code was generated by a tool. // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ using Luban; using SimpleJSON; namespace cfg { public sealed partial class Item : Luban.BeanBase { public Item(JSONNode _buf) { { if(!_buf["id"].IsNumber) { throw new SerializationException(); } Id = _buf["id"]; } { if(!_buf["model"].IsString) { throw new SerializationException(); } Model = _buf["model"]; } { if(!_buf["type"].IsNumber) { throw new SerializationException(); } Type = _buf["type"]; } { if(!_buf["quality"].IsNumber) { throw new SerializationException(); } Quality = _buf["quality"]; } { if(!_buf["brand"].IsNumber) { throw new SerializationException(); } Brand = _buf["brand"]; } { if(!_buf["weight"].IsNumber) { throw new SerializationException(); } Weight = _buf["weight"]; } { if(!_buf["length"].IsNumber) { throw new SerializationException(); } Length = _buf["length"]; } { if(!_buf["max"].IsNumber) { throw new SerializationException(); } Max = _buf["max"]; } { if(!_buf["auto_use"].IsNumber) { throw new SerializationException(); } AutoUse = _buf["auto_use"]; } } public static Item DeserializeItem(JSONNode _buf) { return new Item(_buf); } /// /// Id /// public readonly int Id; /// /// 模型 /// public readonly string Model; /// /// 子类型 /// public readonly int Type; /// /// 品质 /// public readonly int Quality; /// /// 品牌 /// public readonly int Brand; /// /// 重量(克) /// public readonly int Weight; /// /// 长度(毫米) /// public readonly int Length; /// /// 最大堆叠数量 /// public readonly int Max; /// /// 获得自动使用 /// public readonly int AutoUse; public const int __ID__ = 2289459; public override int GetTypeId() => __ID__; public void ResolveRef(Tables tables) { } public override string ToString() { return "{ " + "id:" + Id + "," + "model:" + Model + "," + "type:" + Type + "," + "quality:" + Quality + "," + "brand:" + Brand + "," + "weight:" + Weight + "," + "length:" + Length + "," + "max:" + Max + "," + "autoUse:" + AutoUse + "," + "}"; } } }