//------------------------------------------------------------------------------ // // 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 Fish : Luban.BeanBase { public Fish(JSONNode _buf) { { if(!_buf["id"].IsNumber) { throw new SerializationException(); } Id = _buf["id"]; } { if(!_buf["name"].IsString) { throw new SerializationException(); } Name = _buf["name"]; } { if(!_buf["model"].IsString) { throw new SerializationException(); } Model = _buf["model"]; } { if(!_buf["min_weight"].IsNumber) { throw new SerializationException(); } MinWeight = _buf["min_weight"]; } { if(!_buf["max_weight"].IsNumber) { throw new SerializationException(); } MaxWeight = _buf["max_weight"]; } { if(!_buf["accept"].IsNumber) { throw new SerializationException(); } Accept = _buf["accept"]; } } public static Fish DeserializeFish(JSONNode _buf) { return new Fish(_buf); } /// /// Id /// public readonly int Id; /// /// 鱼名字 /// public readonly string Name; /// /// 模型 /// public readonly string Model; /// /// 最小重量(克) /// public readonly int MinWeight; /// /// 最大重量(克) /// public readonly int MaxWeight; /// /// 接受的鱼饵配置组 /// public readonly int Accept; public const int __ID__ = 2189944; public override int GetTypeId() => __ID__; public void ResolveRef(Tables tables) { } public override string ToString() { return "{ " + "id:" + Id + "," + "name:" + Name + "," + "model:" + Model + "," + "minWeight:" + MinWeight + "," + "maxWeight:" + MaxWeight + "," + "accept:" + Accept + "," + "}"; } } }