//------------------------------------------------------------------------------
//
// 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 SurveyData : Bright.Config.BeanBase
{
public JSONNode json;
public SurveyData(JSONNode _json)
{
{ if(!_json["ID"].IsNumber) { throw new SerializationException(); } ID = _json["ID"]; }
{ if(!_json["Hash"].IsString) { throw new SerializationException(); } Hash = _json["Hash"]; }
{ if(!_json["LevelCondition"].IsNumber) { throw new SerializationException(); } LevelCondition = _json["LevelCondition"]; }
{ var __json0 = _json["TailNumberList"]; if(!__json0.IsArray) { throw new SerializationException(); } TailNumberList = new System.Collections.Generic.List(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } TailNumberList.Add(__v0); } }
{ if(!_json["Reward"].IsNumber) { throw new SerializationException(); } Reward = _json["Reward"]; }
json = _json;
PostInit();
}
public SurveyData(int ID, string Hash, int LevelCondition, System.Collections.Generic.List TailNumberList, int Reward )
{
this.ID = ID;
this.Hash = Hash;
this.LevelCondition = LevelCondition;
this.TailNumberList = TailNumberList;
this.Reward = Reward;
PostInit();
}
public static SurveyData DeserializeSurveyData(JSONNode _json)
{
return new SurveyData(_json);
}
public int ID { get; private set; }
///
/// 对应theme表
///
public string Hash { get; private set; }
///
/// 需要大于这个等级
///
public int LevelCondition { get; private set; }
///
/// 发放给这些尾号的用户
///
public System.Collections.Generic.List TailNumberList { get; private set; }
///
/// 对应Drop表主键
///
public int Reward { get; private set; }
public const int __ID__ = 1319021124;
public override int GetTypeId() => __ID__;
public void Resolve(Dictionary _tables)
{
PostResolve();
}
public void TranslateText(System.Func translator)
{
}
public override string ToString()
{
return "{ "
+ "ID:" + ID + ","
+ "Hash:" + Hash + ","
+ "LevelCondition:" + LevelCondition + ","
+ "TailNumberList:" + Bright.Common.StringUtil.CollectionToString(TailNumberList) + ","
+ "Reward:" + Reward + ","
+ "}";
}
partial void PostInit();
partial void PostResolve();
}
}