//------------------------------------------------------------------------------ // // 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 ResourceStore : Bright.Config.BeanBase { public JSONNode json; public ResourceStore(JSONNode _json) { { if(!_json["Id"].IsNumber) { throw new SerializationException(); } Id = _json["Id"]; } { if(!_json["Type"].IsNumber) { throw new SerializationException(); } Type = _json["Type"]; } { if(!_json["IsShow"].IsNumber) { throw new SerializationException(); } IsShow = _json["IsShow"]; } { if(!_json["Discount"].IsNumber) { throw new SerializationException(); } Discount = _json["Discount"]; } { if(!_json["Price"].IsNumber) { throw new SerializationException(); } Price = _json["Price"]; } { if(!_json["ItemID"].IsNumber) { throw new SerializationException(); } ItemID = _json["ItemID"]; } { if(!_json["Number"].IsNumber) { throw new SerializationException(); } Number = _json["Number"]; } { if(!_json["Value"].IsNumber) { throw new SerializationException(); } Value = _json["Value"]; } json = _json; PostInit(); } public ResourceStore(int Id, int Type, int IsShow, float Discount, int Price, int ItemID, int Number, int Value ) { this.Id = Id; this.Type = Type; this.IsShow = IsShow; this.Discount = Discount; this.Price = Price; this.ItemID = ItemID; this.Number = Number; this.Value = Value; PostInit(); } public static ResourceStore DeserializeResourceStore(JSONNode _json) { return new ResourceStore(_json); } /// /// 主键 /// public int Id { get; private set; } public int Type { get; private set; } public int IsShow { get; private set; } /// /// 配置为空代表无折扣 /// public float Discount { get; private set; } public int Price { get; private set; } public int ItemID { get; private set; } public int Number { get; private set; } public int Value { get; private set; } public const int __ID__ = 1767492947; 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 + "," + "IsShow:" + IsShow + "," + "Discount:" + Discount + "," + "Price:" + Price + "," + "ItemID:" + ItemID + "," + "Number:" + Number + "," + "Value:" + Value + "," + "}"; } partial void PostInit(); partial void PostResolve(); } }