//------------------------------------------------------------------------------
//
// 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 Newtonsoft.Json.Linq;
namespace cfg
{
public sealed partial class Shop : Luban.BeanBase
{
public Shop(JToken _buf)
{
JObject _obj = _buf as JObject;
Id = (int)_obj.GetValue("id");
Group = (int)_obj.GetValue("group");
{ var __json0 = _obj.GetValue("items"); Items = new System.Collections.Generic.List((__json0 as JArray).Count); foreach(JToken __e0 in __json0) { int __v0; __v0 = (int)__e0; Items.Add(__v0); } }
Price1 = (int)_obj.GetValue("price1");
Price2 = (int)_obj.GetValue("price2");
{ var __json0 = _obj.GetValue("label"); Label = new System.Collections.Generic.List((__json0 as JArray).Count); foreach(JToken __e0 in __json0) { int __v0; __v0 = (int)__e0; Label.Add(__v0); } }
Number = (int)_obj.GetValue("number");
Disable = (int)_obj.GetValue("disable");
}
public static Shop DeserializeShop(JToken _buf)
{
return new Shop(_buf);
}
///
/// Id
///
public readonly int Id;
///
/// 组
///
public readonly int Group;
///
/// 物品
///
public readonly System.Collections.Generic.List Items;
///
/// 银币价格
///
public readonly int Price1;
///
/// 金币价格
///
public readonly int Price2;
///
/// 标签
///
public readonly System.Collections.Generic.List Label;
///
/// 可购买数量
///
public readonly int Number;
///
/// 禁用状态
///
public readonly int Disable;
public const int __ID__ = 2576150;
public override int GetTypeId() => __ID__;
public void ResolveRef(Tables tables)
{
}
public override string ToString()
{
return "{ "
+ "id:" + Id + ","
+ "group:" + Group + ","
+ "items:" + Luban.StringUtil.CollectionToString(Items) + ","
+ "price1:" + Price1 + ","
+ "price2:" + Price2 + ","
+ "label:" + Luban.StringUtil.CollectionToString(Label) + ","
+ "number:" + Number + ","
+ "disable:" + Disable + ","
+ "}";
}
}
}