//------------------------------------------------------------------------------ // // 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 Luban; using SimpleJSON; namespace cfg.data { public sealed partial class Card : Luban.BeanBase { public Card(JSONNode _buf) { { if(!_buf["id"].IsNumber) { throw new SerializationException(); } Id = _buf["id"]; } { if(!_buf["cn"].IsString) { throw new SerializationException(); } Cn = _buf["cn"]; } { if(!_buf["weight"].IsNumber) { throw new SerializationException(); } Weight = _buf["weight"]; } { if(!_buf["type"].IsNumber) { throw new SerializationException(); } Type = _buf["type"]; } { if(!_buf["source"].IsString) { throw new SerializationException(); } Source = _buf["source"]; } } public static Card DeserializeCard(JSONNode _buf) { return new data.Card(_buf); } public readonly int Id; /// /// 注释 /// public readonly string Cn; /// /// 比大小权重 /// public readonly int Weight; /// /// 类型 /// public readonly int Type; /// /// 资源名 /// public readonly string Source; public const int __ID__ = -410094860; public override int GetTypeId() => __ID__; public void ResolveRef(Tables tables) { } public override string ToString() { return "{ " + "id:" + Id + "," + "cn:" + Cn + "," + "weight:" + Weight + "," + "type:" + Type + "," + "source:" + Source + "," + "}"; } } }