//------------------------------------------------------------------------------
//
// 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.BlacksmithData
{
public sealed partial class StoreData : Luban.BeanBase
{
public StoreData(JSONNode _buf)
{
{ if(!_buf["ID"].IsNumber) { throw new SerializationException(); } ID = _buf["ID"]; }
{ var __json0 = _buf["Itemrefresh"]; if(!__json0.IsArray) { throw new SerializationException(); } Itemrefresh = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Itemrefresh.Add(__v0); } }
{ var __json0 = _buf["Discount"]; if(!__json0.IsArray) { throw new SerializationException(); } Discount = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Discount.Add(__v0); } }
{ var __json0 = _buf["Discountweight"]; if(!__json0.IsArray) { throw new SerializationException(); } Discountweight = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } Discountweight.Add(__v0); } }
}
public static StoreData DeserializeStoreData(JSONNode _buf)
{
return new BlacksmithData.StoreData(_buf);
}
///
/// #ID
///
public readonly int ID;
///
/// 商城随机表ID
///
public readonly System.Collections.Generic.List Itemrefresh;
///
/// 折扣
///
public readonly System.Collections.Generic.List Discount;
///
/// 折扣权重
///
public readonly System.Collections.Generic.List Discountweight;
public const int __ID__ = -679094421;
public override int GetTypeId() => __ID__;
public void ResolveRef(Tables tables)
{
}
public override string ToString()
{
return "{ "
+ "ID:" + ID + ","
+ "Itemrefresh:" + Luban.StringUtil.CollectionToString(Itemrefresh) + ","
+ "Discount:" + Luban.StringUtil.CollectionToString(Discount) + ","
+ "Discountweight:" + Luban.StringUtil.CollectionToString(Discountweight) + ","
+ "}";
}
}
}