//------------------------------------------------------------------------------
//
// 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 Bright.Serialization;
using System.Collections.Generic;
using SimpleJSON;
namespace cfg
{
public sealed partial class ShopToken : Bright.Config.BeanBase
{
public JSONNode json;
public ShopToken(JSONNode _json)
{
{ if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
{ if(!_json["Type"].IsNumber) { throw new SerializationException(); } Type = _json["Type"]; }
{ if(!_json["IAP_ID"].IsNumber) { throw new SerializationException(); } IAPID = _json["IAP_ID"]; }
{ if(!_json["TokenID"].IsNumber) { throw new SerializationException(); } TokenID = _json["TokenID"]; }
{ if(!_json["Number"].IsNumber) { throw new SerializationException(); } Number = _json["Number"]; }
{ if(!_json["Value_More"].IsNumber) { throw new SerializationException(); } ValueMore = _json["Value_More"]; }
{ if(!_json["FirstPurchase_Gift"].IsNumber) { throw new SerializationException(); } FirstPurchaseGift = _json["FirstPurchase_Gift"]; }
{ if(!_json["Product_Icon"].IsString) { throw new SerializationException(); } ProductIcon = _json["Product_Icon"]; }
{ if(!_json["Tag"].IsNumber) { throw new SerializationException(); } Tag = _json["Tag"]; }
json = _json;
PostInit();
}
public ShopToken(int ID, int Type, int IAP_ID, int TokenID, int Number, float Value_More, int FirstPurchase_Gift, string Product_Icon, int Tag )
{
this.ID = ID;
this.Type = Type;
this.IAPID = IAP_ID;
this.TokenID = TokenID;
this.Number = Number;
this.ValueMore = Value_More;
this.FirstPurchaseGift = FirstPurchase_Gift;
this.ProductIcon = Product_Icon;
this.Tag = Tag;
PostInit();
}
public static ShopToken DeserializeShopToken(JSONNode _json)
{
return new ShopToken(_json);
}
public int ID { get; private set; }
///
/// 1:体力直充
2:钞票直充
3:钻石直充
4:资源不足-
5:资源不足-
6:广告券
///
public int Type { get; private set; }
public int IAPID { get; private set; }
public int TokenID { get; private set; }
public int Number { get; private set; }
public float ValueMore { get; private set; }
public int FirstPurchaseGift { get; private set; }
public string ProductIcon { get; private set; }
///
/// #1 最受欢迎
#2 最超值
///
public int Tag { get; private set; }
public const int __ID__ = -110069629;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary _tables)
{
PostResolve();
}
public void TranslateText(System.Func translator)
{
}
public override string ToString()
{
return "{ "
+ "ID:" + ID + ","
+ "Type:" + Type + ","
+ "IAPID:" + IAPID + ","
+ "TokenID:" + TokenID + ","
+ "Number:" + Number + ","
+ "ValueMore:" + ValueMore + ","
+ "FirstPurchaseGift:" + FirstPurchaseGift + ","
+ "ProductIcon:" + ProductIcon + ","
+ "Tag:" + Tag + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}