
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using Luban;
using SimpleJSON;


namespace cfg
{
public sealed partial class Lure : Luban.BeanBase
{
    public Lure(JSONNode _buf) 
    {
        { if(!_buf["id"].IsNumber) { throw new SerializationException(); }  Id = _buf["id"]; }
        { var __json0 = _buf["hook"]; if(!__json0.IsArray) { throw new SerializationException(); } Hook = new System.Collections.Generic.List<int>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0;  { if(!__e0.IsNumber) { throw new SerializationException(); }  __v0 = __e0; }  Hook.Add(__v0); }   }
        { if(!_buf["hook_num"].IsNumber) { throw new SerializationException(); }  HookNum = _buf["hook_num"]; }
        { if(!_buf["efficacy_base"].IsNumber) { throw new SerializationException(); }  EfficacyBase = _buf["efficacy_base"]; }
    }

    public static Lure DeserializeLure(JSONNode _buf)
    {
        return new Lure(_buf);
    }

    /// <summary>
    /// Id
    /// </summary>
    public readonly int Id;
    /// <summary>
    /// 鱼钩
    /// </summary>
    public readonly System.Collections.Generic.List<int> Hook;
    /// <summary>
    /// 装配鱼钩数量
    /// </summary>
    public readonly int HookNum;
    /// <summary>
    /// 吸引力
    /// </summary>
    public readonly int EfficacyBase;
   
    public const int __ID__ = 2380188;
    public override int GetTypeId() => __ID__;

    public  void ResolveRef(Tables tables)
    {
    }

    public override string ToString()
    {
        return "{ "
        + "id:" + Id + ","
        + "hook:" + Luban.StringUtil.CollectionToString(Hook) + ","
        + "hookNum:" + HookNum + ","
        + "efficacyBase:" + EfficacyBase + ","
        + "}";
    }
}
}

