95 lines
3.3 KiB
C#
95 lines
3.3 KiB
C#
//------------------------------------------------------------------------------
|
||
// <auto-generated>
|
||
// This code was generated by a tool.
|
||
// Changes to this file may cause incorrect behavior and will be lost if
|
||
// the code is regenerated.
|
||
// </auto-generated>
|
||
//------------------------------------------------------------------------------
|
||
using Bright.Serialization;
|
||
using System.Collections.Generic;
|
||
using SimpleJSON;
|
||
|
||
|
||
|
||
namespace cfg
|
||
{
|
||
|
||
public sealed partial class CDKey : Bright.Config.BeanBase
|
||
{
|
||
public JSONNode json;
|
||
public CDKey(JSONNode _json)
|
||
{
|
||
{ if(!_json["GroupID"].IsNumber) { throw new SerializationException(); } GroupID = _json["GroupID"]; }
|
||
{ if(!_json["StartTime"].IsString) { throw new SerializationException(); } StartTime = _json["StartTime"]; }
|
||
{ if(!_json["EndTime"].IsString) { throw new SerializationException(); } EndTime = _json["EndTime"]; }
|
||
{ if(!_json["UserLifeTime"].IsNumber) { throw new SerializationException(); } UserLifeTime = _json["UserLifeTime"]; }
|
||
{ var __json0 = _json["ChannelList"]; if(!__json0.IsArray) { throw new SerializationException(); } ChannelList = new System.Collections.Generic.List<int>(__json0.Count); foreach(JSONNode __e0 in __json0.Children) { int __v0; { if(!__e0.IsNumber) { throw new SerializationException(); } __v0 = __e0; } ChannelList.Add(__v0); } }
|
||
{ if(!_json["DropID"].IsNumber) { throw new SerializationException(); } DropID = _json["DropID"]; }
|
||
json = _json;
|
||
PostInit();
|
||
}
|
||
|
||
public CDKey(int GroupID, string StartTime, string EndTime, int UserLifeTime, System.Collections.Generic.List<int> ChannelList, int DropID )
|
||
{
|
||
this.GroupID = GroupID;
|
||
this.StartTime = StartTime;
|
||
this.EndTime = EndTime;
|
||
this.UserLifeTime = UserLifeTime;
|
||
this.ChannelList = ChannelList;
|
||
this.DropID = DropID;
|
||
PostInit();
|
||
}
|
||
|
||
public static CDKey DeserializeCDKey(JSONNode _json)
|
||
{
|
||
return new CDKey(_json);
|
||
}
|
||
|
||
/// <summary>
|
||
/// 组别
|
||
/// </summary>
|
||
public int GroupID { get; private set; }
|
||
public string StartTime { get; private set; }
|
||
public string EndTime { get; private set; }
|
||
/// <summary>
|
||
/// 单位:天<br/>-1则为没有生命周期限制
|
||
/// </summary>
|
||
public int UserLifeTime { get; private set; }
|
||
/// <summary>
|
||
/// -1:所有
|
||
/// </summary>
|
||
public System.Collections.Generic.List<int> ChannelList { get; private set; }
|
||
/// <summary>
|
||
/// 对应Drop表主键
|
||
/// </summary>
|
||
public int DropID { get; private set; }
|
||
|
||
public const int __ID__ = 63977022;
|
||
public override int GetTypeId() => __ID__;
|
||
|
||
public void Resolve(Dictionary<string, object> _tables)
|
||
{
|
||
PostResolve();
|
||
}
|
||
|
||
public void TranslateText(System.Func<string, string, string> translator)
|
||
{
|
||
}
|
||
|
||
public override string ToString()
|
||
{
|
||
return "{ "
|
||
+ "GroupID:" + GroupID + ","
|
||
+ "StartTime:" + StartTime + ","
|
||
+ "EndTime:" + EndTime + ","
|
||
+ "UserLifeTime:" + UserLifeTime + ","
|
||
+ "ChannelList:" + Bright.Common.StringUtil.CollectionToString(ChannelList) + ","
|
||
+ "DropID:" + DropID + ","
|
||
+ "}";
|
||
}
|
||
|
||
partial void PostInit();
|
||
partial void PostResolve();
|
||
}
|
||
}
|