//------------------------------------------------------------------------------ // // 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 Notification : Bright.Config.BeanBase { public JSONNode json; public Notification(JSONNode _json) { { if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; } { if(!_json["Type"].IsNumber) { throw new SerializationException(); } Type = _json["Type"]; } { if(!_json["NotTime"].IsString) { throw new SerializationException(); } NotTime = _json["NotTime"]; } { 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["Content"]["key"].IsString) { throw new SerializationException(); } Content_l10n_key = _json["Content"]["key"]; if(!_json["Content"]["text"].IsString) { throw new SerializationException(); } Content = _json["Content"]["text"]; } json = _json; PostInit(); } public Notification(int ID, int Type, string NotTime, string Title, string Content ) { this.ID = ID; this.Type = Type; this.NotTime = NotTime; this.Title = Title; this.Content = Content; PostInit(); } public static Notification DeserializeNotification(JSONNode _json) { return new Notification(_json); } /// /// 通知编号 /// public int ID { get; private set; } /// /// 0:普通推送
1:排行榜推送,解锁当日排行榜并获得排名时触发转天的推送 ///
public int Type { get; private set; } /// /// 格林威治时间 /// public string NotTime { get; private set; } /// /// key /// public string Title { get; private set; } public string Title_l10n_key { get; } /// /// key /// public string Content { get; private set; } public string Content_l10n_key { get; } public const int __ID__ = 759553291; public override int GetTypeId() => __ID__; public void Resolve(Dictionary _tables) { PostResolve(); } public void TranslateText(System.Func translator) { Title = translator(Title_l10n_key, Title); Content = translator(Content_l10n_key, Content); } public override string ToString() { return "{ " + "ID:" + ID + "," + "Type:" + Type + "," + "NotTime:" + NotTime + "," + "Title:" + Title + "," + "Content:" + Content + "," + "}"; } partial void PostInit(); partial void PostResolve(); } }