//------------------------------------------------------------------------------ // // 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 EventCoupon : Bright.Config.BeanBase { public JSONNode json; public EventCoupon(JSONNode _json) { { if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; } { if(!_json["Icon"].IsString) { throw new SerializationException(); } Icon = _json["Icon"]; } { if(!_json["Title"]["key"].IsString) { throw new SerializationException(); } Title_l10n_key = _json["Title"]["key"]; if(!_json["Title"]["text"].IsString) { throw new SerializationException(); } Title = _json["Title"]["text"]; } { if(!_json["BgBanner"].IsString) { throw new SerializationException(); } BgBanner = _json["BgBanner"]; } { if(!_json["LabelShop1"].IsString) { throw new SerializationException(); } LabelShop1 = _json["LabelShop1"]; } { if(!_json["LabelShop2"].IsString) { throw new SerializationException(); } LabelShop2 = _json["LabelShop2"]; } { if(!_json["FontColorPercent"].IsString) { throw new SerializationException(); } FontColorPercent = _json["FontColorPercent"]; } { if(!_json["FontColorTime"].IsString) { throw new SerializationException(); } FontColorTime = _json["FontColorTime"]; } { if(!_json["Time"].IsNumber) { throw new SerializationException(); } Time = _json["Time"]; } { if(!_json["Multiple"].IsNumber) { throw new SerializationException(); } Multiple = _json["Multiple"]; } json = _json; PostInit(); } public EventCoupon(int ID, string Icon, string Title, string BgBanner, string LabelShop1, string LabelShop2, string FontColorPercent, string FontColorTime, int Time, int Multiple ) { this.ID = ID; this.Icon = Icon; this.Title = Title; this.BgBanner = BgBanner; this.LabelShop1 = LabelShop1; this.LabelShop2 = LabelShop2; this.FontColorPercent = FontColorPercent; this.FontColorTime = FontColorTime; this.Time = Time; this.Multiple = Multiple; PostInit(); } public static EventCoupon DeserializeEventCoupon(JSONNode _json) { return new EventCoupon(_json); } public int ID { get; private set; } public string Icon { get; private set; } /// /// key /// public string Title { get; private set; } public string Title_l10n_key { get; } public string BgBanner { get; private set; } public string LabelShop1 { get; private set; } public string LabelShop2 { get; private set; } public string FontColorPercent { get; private set; } public string FontColorTime { get; private set; } public int Time { get; private set; } /// /// 120=额外120% /// public int Multiple { get; private set; } public const int __ID__ = 1312424768; public override int GetTypeId() => __ID__; public void Resolve(Dictionary _tables) { PostResolve(); } public void TranslateText(System.Func translator) { Title = translator(Title_l10n_key, Title); } public override string ToString() { return "{ " + "ID:" + ID + "," + "Icon:" + Icon + "," + "Title:" + Title + "," + "BgBanner:" + BgBanner + "," + "LabelShop1:" + LabelShop1 + "," + "LabelShop2:" + LabelShop2 + "," + "FontColorPercent:" + FontColorPercent + "," + "FontColorTime:" + FontColorTime + "," + "Time:" + Time + "," + "Multiple:" + Multiple + "," + "}"; } partial void PostInit(); partial void PostResolve(); } }