
//------------------------------------------------------------------------------
// <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 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);
    }

    /// <summary>
    /// Id
    /// </summary>
    public readonly int Id;
    /// <summary>
    /// 鱼名字
    /// </summary>
    public readonly string Name;
    /// <summary>
    /// 模型
    /// </summary>
    public readonly string Model;
    /// <summary>
    /// 最小重量(克)
    /// </summary>
    public readonly int MinWeight;
    /// <summary>
    /// 最大重量(克)
    /// </summary>
    public readonly int MaxWeight;
    /// <summary>
    /// 接受的鱼饵配置组
    /// </summary>
    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 + ","
        + "}";
    }
}
}

