SimpleConfigTable.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // Generate By EToy
  2. // Don't Edit It!!
  3. using XGame.Framework.Database;
  4. using XGame.Framework.Serialization;
  5. namespace XGame.Database
  6. {
  7. /// <summary> SimpleConfig </summary>
  8. public sealed class SimpleConfigTable : ITable
  9. {
  10. long ITable.Key => Id;
  11. /// <summary> 主键 </summary>
  12. public int Id { get; private set; }
  13. /// <summary> str </summary>
  14. public string Str { get; private set; } // c
  15. /// <summary> str数组 </summary>
  16. public string[] Strs { get; private set; } // sc
  17. /// <summary> 奖励 </summary>
  18. public Award[] Awards { get; private set; } // default:[{item_600004,1,0}]
  19. /// <summary> 枚举 </summary>
  20. public EQualityLevel Type { get; private set; }
  21. void ISerializable.Deserialize(IReader reader)
  22. {
  23. Id = reader.ReadInt();
  24. Str = reader.ReadString();
  25. Strs = reader.ReadEnumerable<string[]>();
  26. Awards = reader.ReadEnumerable<Award[]>();
  27. Type = (EQualityLevel)reader.ReadInt();
  28. }
  29. void ISerializable.Serialize(IWriter writer)
  30. {
  31. writer.Write(Id);
  32. writer.Write(Str);
  33. writer.Write(Strs);
  34. writer.Write(Awards);
  35. writer.Write((int)Type);
  36. }
  37. }
  38. }