//------------------------------------------------------------------------------ // // 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 FishingEvent : Bright.Config.BeanBase { public JSONNode json; public FishingEvent(JSONNode _json) { { if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; } { if(!_json["Type"].IsNumber) { throw new SerializationException(); } Type = _json["Type"]; } { if(!_json["SubType"].IsNumber) { throw new SerializationException(); } SubType = _json["SubType"]; } { if(!_json["RedirectID"].IsNumber) { throw new SerializationException(); } RedirectID = _json["RedirectID"]; } { if(!_json["IsABTest"].IsBoolean) { throw new SerializationException(); } IsABTest = _json["IsABTest"]; } { var __json0 = _json["Channel"]; if(!__json0.IsArray) { throw new SerializationException(); } Channel = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { string __v0; { if(!__e0.IsString) { throw new SerializationException(); } __v0 = __e0; } Channel.Add(__v0); } } { if(!_json["TimeDefinition"].IsObject) { throw new SerializationException(); } TimeDefinition = FishingEventType.DeserializeFishingEventType(_json["TimeDefinition"]); } { if(!_json["ConditionRelation"].IsNumber) { throw new SerializationException(); } ConditionRelation = _json["ConditionRelation"]; } { var __json0 = _json["ConditionList"]; if(!__json0.IsArray) { throw new SerializationException(); } ConditionList = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { EventCondition __v0; { if(!__e0.IsObject) { throw new SerializationException(); } __v0 = EventCondition.DeserializeEventCondition(__e0); } ConditionList.Add(__v0); } } { if(!_json["PopupPriority"].IsNumber) { throw new SerializationException(); } PopupPriority = _json["PopupPriority"]; } { if(!_json["PopupType"].IsNumber) { throw new SerializationException(); } PopupType = (PopupType)_json["PopupType"].AsInt; } json = _json; PostInit(); } public FishingEvent(int ID, int Type, int SubType, int RedirectID, bool IsABTest, System.Collections.Generic.List Channel, FishingEventType TimeDefinition, int ConditionRelation, System.Collections.Generic.List ConditionList, int PopupPriority, PopupType PopupType ) { this.ID = ID; this.Type = Type; this.SubType = SubType; this.RedirectID = RedirectID; this.IsABTest = IsABTest; this.Channel = Channel; this.TimeDefinition = TimeDefinition; this.ConditionRelation = ConditionRelation; this.ConditionList = ConditionList; this.PopupPriority = PopupPriority; this.PopupType = PopupType; PostInit(); } public static FishingEvent DeserializeFishingEvent(JSONNode _json) { return new FishingEvent(_json); } /// /// #备注行 /// public int ID { get; private set; } /// /// 见附录 /// public int Type { get; private set; } /// /// 见附录 /// public int SubType { get; private set; } /// /// 对应表格的编号 /// public int RedirectID { get; private set; } /// /// 0:否
1:是
是AB Test的不会读取生效 ///
public bool IsABTest { get; private set; } /// /// 0:全部开放
有值:配了哪个开哪个 ///
public System.Collections.Generic.List Channel { get; private set; } /// /// Forever:永久活动
LimitedTime:限时活动
UserRegistration:用户注册时间
Daily:日活动
Weekly:周活动 ///
public FishingEventType TimeDefinition { get; private set; } /// /// ConditionList填多个时生效
0:或
1:与 ///
public int ConditionRelation { get; private set; } /// /// 见enum表 /// public System.Collections.Generic.List ConditionList { get; private set; } /// /// 对应拍脸表编号
越大越靠前 ///
public int PopupPriority { get; private set; } /// /// PopupSpecial:特殊拍脸
PopupLogin:每次登录拍脸
PopupDaily:每日刷新时拍脸
PopupEvent:活动期间拍脸1次 ///
public PopupType PopupType { get; private set; } public const int __ID__ = 792394320; public override int GetTypeId() => __ID__; public void Resolve(Dictionary _tables) { TimeDefinition?.Resolve(_tables); foreach(var _e in ConditionList) { _e?.Resolve(_tables); } PostResolve(); } public void TranslateText(System.Func translator) { TimeDefinition?.TranslateText(translator); foreach(var _e in ConditionList) { _e?.TranslateText(translator); } } public override string ToString() { return "{ " + "ID:" + ID + "," + "Type:" + Type + "," + "SubType:" + SubType + "," + "RedirectID:" + RedirectID + "," + "IsABTest:" + IsABTest + "," + "Channel:" + Bright.Common.StringUtil.CollectionToString(Channel) + "," + "TimeDefinition:" + TimeDefinition + "," + "ConditionRelation:" + ConditionRelation + "," + "ConditionList:" + Bright.Common.StringUtil.CollectionToString(ConditionList) + "," + "PopupPriority:" + PopupPriority + "," + "PopupType:" + PopupType + "," + "}"; } partial void PostInit(); partial void PostResolve(); } }