2024-04-21 00:21:57 +00:00
|
|
|
// <auto-generated>
|
|
|
|
// automatically generated by the FlatBuffers compiler, do not modify
|
|
|
|
// </auto-generated>
|
|
|
|
|
|
|
|
namespace SCHALE.Common.FlatData
|
|
|
|
{
|
|
|
|
|
|
|
|
using global::System;
|
|
|
|
using global::System.Collections.Generic;
|
2024-04-29 15:52:45 +00:00
|
|
|
using global::SCHALE.Common.Crypto;
|
2024-04-21 00:21:57 +00:00
|
|
|
using global::Google.FlatBuffers;
|
|
|
|
|
|
|
|
public struct ShopExcel : IFlatbufferObject
|
|
|
|
{
|
|
|
|
private Table __p;
|
|
|
|
public ByteBuffer ByteBuffer { get { return __p.bb; } }
|
|
|
|
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
|
|
|
|
public static ShopExcel GetRootAsShopExcel(ByteBuffer _bb) { return GetRootAsShopExcel(_bb, new ShopExcel()); }
|
|
|
|
public static ShopExcel GetRootAsShopExcel(ByteBuffer _bb, ShopExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
|
|
|
|
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
|
|
|
|
public ShopExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
|
|
|
|
|
|
|
public long Id { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
|
|
|
|
public uint LocalizeEtcId { get { int o = __p.__offset(6); return o != 0 ? __p.bb.GetUint(o + __p.bb_pos) : (uint)0; } }
|
|
|
|
public SCHALE.Common.FlatData.ShopCategoryType CategoryType { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.ShopCategoryType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ShopCategoryType.General; } }
|
|
|
|
public bool IsLegacy { get { int o = __p.__offset(10); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } }
|
|
|
|
public long GoodsId(int j) { int o = __p.__offset(12); return o != 0 ? __p.bb.GetLong(__p.__vector(o) + j * 8) : (long)0; }
|
|
|
|
public int GoodsIdLength { get { int o = __p.__offset(12); return o != 0 ? __p.__vector_len(o) : 0; } }
|
|
|
|
#if ENABLE_SPAN_T
|
|
|
|
public Span<long> GetGoodsIdBytes() { return __p.__vector_as_span<long>(12, 8); }
|
|
|
|
#else
|
|
|
|
public ArraySegment<byte>? GetGoodsIdBytes() { return __p.__vector_as_arraysegment(12); }
|
|
|
|
#endif
|
|
|
|
public long[] GetGoodsIdArray() { return __p.__vector_as_array<long>(12); }
|
|
|
|
public long DisplayOrder { get { int o = __p.__offset(14); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
|
|
|
|
public string SalePeriodFrom { get { int o = __p.__offset(16); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
|
|
|
|
#if ENABLE_SPAN_T
|
|
|
|
public Span<byte> GetSalePeriodFromBytes() { return __p.__vector_as_span<byte>(16, 1); }
|
|
|
|
#else
|
|
|
|
public ArraySegment<byte>? GetSalePeriodFromBytes() { return __p.__vector_as_arraysegment(16); }
|
|
|
|
#endif
|
|
|
|
public byte[] GetSalePeriodFromArray() { return __p.__vector_as_array<byte>(16); }
|
|
|
|
public string SalePeriodTo { get { int o = __p.__offset(18); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
|
|
|
|
#if ENABLE_SPAN_T
|
|
|
|
public Span<byte> GetSalePeriodToBytes() { return __p.__vector_as_span<byte>(18, 1); }
|
|
|
|
#else
|
|
|
|
public ArraySegment<byte>? GetSalePeriodToBytes() { return __p.__vector_as_arraysegment(18); }
|
|
|
|
#endif
|
|
|
|
public byte[] GetSalePeriodToArray() { return __p.__vector_as_array<byte>(18); }
|
|
|
|
public long PurchaseCooltimeMin { get { int o = __p.__offset(20); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
|
|
|
|
public long PurchaseCountLimit { get { int o = __p.__offset(22); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
|
2024-12-30 22:20:43 +00:00
|
|
|
public SCHALE.Common.FlatData.PurchaseCountResetType PurchaseCountResetType { get { int o = __p.__offset(24); return o != 0 ? (SCHALE.Common.FlatData.PurchaseCountResetType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.PurchaseCountResetType.None; } }
|
2024-04-21 00:21:57 +00:00
|
|
|
public string BuyReportEventName { get { int o = __p.__offset(26); return o != 0 ? __p.__string(o + __p.bb_pos) : null; } }
|
|
|
|
#if ENABLE_SPAN_T
|
|
|
|
public Span<byte> GetBuyReportEventNameBytes() { return __p.__vector_as_span<byte>(26, 1); }
|
|
|
|
#else
|
|
|
|
public ArraySegment<byte>? GetBuyReportEventNameBytes() { return __p.__vector_as_arraysegment(26); }
|
|
|
|
#endif
|
|
|
|
public byte[] GetBuyReportEventNameArray() { return __p.__vector_as_array<byte>(26); }
|
|
|
|
public bool RestrictBuyWhenInventoryFull { get { int o = __p.__offset(28); return o != 0 ? 0!=__p.bb.Get(o + __p.bb_pos) : (bool)false; } }
|
2024-12-30 22:20:43 +00:00
|
|
|
public SCHALE.Common.FlatData.ProductDisplayTag DisplayTag { get { int o = __p.__offset(30); return o != 0 ? (SCHALE.Common.FlatData.ProductDisplayTag)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ProductDisplayTag.None; } }
|
2024-04-21 00:21:57 +00:00
|
|
|
public int ShopUpdateGroupId { get { int o = __p.__offset(32); return o != 0 ? __p.bb.GetInt(o + __p.bb_pos) : (int)0; } }
|
|
|
|
|
|
|
|
public static Offset<SCHALE.Common.FlatData.ShopExcel> CreateShopExcel(FlatBufferBuilder builder,
|
|
|
|
long Id = 0,
|
|
|
|
uint LocalizeEtcId = 0,
|
|
|
|
SCHALE.Common.FlatData.ShopCategoryType CategoryType = SCHALE.Common.FlatData.ShopCategoryType.General,
|
|
|
|
bool IsLegacy = false,
|
|
|
|
VectorOffset GoodsIdOffset = default(VectorOffset),
|
|
|
|
long DisplayOrder = 0,
|
|
|
|
StringOffset SalePeriodFromOffset = default(StringOffset),
|
|
|
|
StringOffset SalePeriodToOffset = default(StringOffset),
|
|
|
|
long PurchaseCooltimeMin = 0,
|
|
|
|
long PurchaseCountLimit = 0,
|
2024-12-30 22:20:43 +00:00
|
|
|
SCHALE.Common.FlatData.PurchaseCountResetType PurchaseCountResetType = SCHALE.Common.FlatData.PurchaseCountResetType.None,
|
2024-04-21 00:21:57 +00:00
|
|
|
StringOffset BuyReportEventNameOffset = default(StringOffset),
|
|
|
|
bool RestrictBuyWhenInventoryFull = false,
|
2024-12-30 22:20:43 +00:00
|
|
|
SCHALE.Common.FlatData.ProductDisplayTag DisplayTag = SCHALE.Common.FlatData.ProductDisplayTag.None,
|
2024-04-21 00:21:57 +00:00
|
|
|
int ShopUpdateGroupId = 0) {
|
|
|
|
builder.StartTable(15);
|
|
|
|
ShopExcel.AddPurchaseCountLimit(builder, PurchaseCountLimit);
|
|
|
|
ShopExcel.AddPurchaseCooltimeMin(builder, PurchaseCooltimeMin);
|
|
|
|
ShopExcel.AddDisplayOrder(builder, DisplayOrder);
|
|
|
|
ShopExcel.AddId(builder, Id);
|
|
|
|
ShopExcel.AddShopUpdateGroupId(builder, ShopUpdateGroupId);
|
|
|
|
ShopExcel.AddDisplayTag(builder, DisplayTag);
|
|
|
|
ShopExcel.AddBuyReportEventName(builder, BuyReportEventNameOffset);
|
2024-12-30 22:20:43 +00:00
|
|
|
ShopExcel.AddPurchaseCountResetType(builder, PurchaseCountResetType);
|
2024-04-21 00:21:57 +00:00
|
|
|
ShopExcel.AddSalePeriodTo(builder, SalePeriodToOffset);
|
|
|
|
ShopExcel.AddSalePeriodFrom(builder, SalePeriodFromOffset);
|
|
|
|
ShopExcel.AddGoodsId(builder, GoodsIdOffset);
|
|
|
|
ShopExcel.AddCategoryType(builder, CategoryType);
|
|
|
|
ShopExcel.AddLocalizeEtcId(builder, LocalizeEtcId);
|
|
|
|
ShopExcel.AddRestrictBuyWhenInventoryFull(builder, RestrictBuyWhenInventoryFull);
|
|
|
|
ShopExcel.AddIsLegacy(builder, IsLegacy);
|
|
|
|
return ShopExcel.EndShopExcel(builder);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void StartShopExcel(FlatBufferBuilder builder) { builder.StartTable(15); }
|
|
|
|
public static void AddId(FlatBufferBuilder builder, long id) { builder.AddLong(0, id, 0); }
|
|
|
|
public static void AddLocalizeEtcId(FlatBufferBuilder builder, uint localizeEtcId) { builder.AddUint(1, localizeEtcId, 0); }
|
|
|
|
public static void AddCategoryType(FlatBufferBuilder builder, SCHALE.Common.FlatData.ShopCategoryType categoryType) { builder.AddInt(2, (int)categoryType, 0); }
|
|
|
|
public static void AddIsLegacy(FlatBufferBuilder builder, bool isLegacy) { builder.AddBool(3, isLegacy, false); }
|
|
|
|
public static void AddGoodsId(FlatBufferBuilder builder, VectorOffset goodsIdOffset) { builder.AddOffset(4, goodsIdOffset.Value, 0); }
|
|
|
|
public static VectorOffset CreateGoodsIdVector(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); for (int i = data.Length - 1; i >= 0; i--) builder.AddLong(data[i]); return builder.EndVector(); }
|
|
|
|
public static VectorOffset CreateGoodsIdVectorBlock(FlatBufferBuilder builder, long[] data) { builder.StartVector(8, data.Length, 8); builder.Add(data); return builder.EndVector(); }
|
|
|
|
public static VectorOffset CreateGoodsIdVectorBlock(FlatBufferBuilder builder, ArraySegment<long> data) { builder.StartVector(8, data.Count, 8); builder.Add(data); return builder.EndVector(); }
|
|
|
|
public static VectorOffset CreateGoodsIdVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<long>(dataPtr, sizeInBytes); return builder.EndVector(); }
|
|
|
|
public static void StartGoodsIdVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(8, numElems, 8); }
|
|
|
|
public static void AddDisplayOrder(FlatBufferBuilder builder, long displayOrder) { builder.AddLong(5, displayOrder, 0); }
|
|
|
|
public static void AddSalePeriodFrom(FlatBufferBuilder builder, StringOffset salePeriodFromOffset) { builder.AddOffset(6, salePeriodFromOffset.Value, 0); }
|
|
|
|
public static void AddSalePeriodTo(FlatBufferBuilder builder, StringOffset salePeriodToOffset) { builder.AddOffset(7, salePeriodToOffset.Value, 0); }
|
|
|
|
public static void AddPurchaseCooltimeMin(FlatBufferBuilder builder, long purchaseCooltimeMin) { builder.AddLong(8, purchaseCooltimeMin, 0); }
|
|
|
|
public static void AddPurchaseCountLimit(FlatBufferBuilder builder, long purchaseCountLimit) { builder.AddLong(9, purchaseCountLimit, 0); }
|
2024-12-30 22:20:43 +00:00
|
|
|
public static void AddPurchaseCountResetType(FlatBufferBuilder builder, SCHALE.Common.FlatData.PurchaseCountResetType purchaseCountResetType) { builder.AddInt(10, (int)purchaseCountResetType, 0); }
|
2024-04-21 00:21:57 +00:00
|
|
|
public static void AddBuyReportEventName(FlatBufferBuilder builder, StringOffset buyReportEventNameOffset) { builder.AddOffset(11, buyReportEventNameOffset.Value, 0); }
|
|
|
|
public static void AddRestrictBuyWhenInventoryFull(FlatBufferBuilder builder, bool restrictBuyWhenInventoryFull) { builder.AddBool(12, restrictBuyWhenInventoryFull, false); }
|
|
|
|
public static void AddDisplayTag(FlatBufferBuilder builder, SCHALE.Common.FlatData.ProductDisplayTag displayTag) { builder.AddInt(13, (int)displayTag, 0); }
|
|
|
|
public static void AddShopUpdateGroupId(FlatBufferBuilder builder, int shopUpdateGroupId) { builder.AddInt(14, shopUpdateGroupId, 0); }
|
|
|
|
public static Offset<SCHALE.Common.FlatData.ShopExcel> EndShopExcel(FlatBufferBuilder builder) {
|
|
|
|
int o = builder.EndTable();
|
|
|
|
return new Offset<SCHALE.Common.FlatData.ShopExcel>(o);
|
|
|
|
}
|
2024-04-29 15:52:45 +00:00
|
|
|
public ShopExcelT UnPack() {
|
|
|
|
var _o = new ShopExcelT();
|
|
|
|
this.UnPackTo(_o);
|
|
|
|
return _o;
|
|
|
|
}
|
|
|
|
public void UnPackTo(ShopExcelT _o) {
|
|
|
|
byte[] key = TableEncryptionService.CreateKey("Shop");
|
|
|
|
_o.Id = TableEncryptionService.Convert(this.Id, key);
|
|
|
|
_o.LocalizeEtcId = TableEncryptionService.Convert(this.LocalizeEtcId, key);
|
|
|
|
_o.CategoryType = TableEncryptionService.Convert(this.CategoryType, key);
|
|
|
|
_o.IsLegacy = TableEncryptionService.Convert(this.IsLegacy, key);
|
|
|
|
_o.GoodsId = new List<long>();
|
|
|
|
for (var _j = 0; _j < this.GoodsIdLength; ++_j) {_o.GoodsId.Add(TableEncryptionService.Convert(this.GoodsId(_j), key));}
|
|
|
|
_o.DisplayOrder = TableEncryptionService.Convert(this.DisplayOrder, key);
|
|
|
|
_o.SalePeriodFrom = TableEncryptionService.Convert(this.SalePeriodFrom, key);
|
|
|
|
_o.SalePeriodTo = TableEncryptionService.Convert(this.SalePeriodTo, key);
|
|
|
|
_o.PurchaseCooltimeMin = TableEncryptionService.Convert(this.PurchaseCooltimeMin, key);
|
|
|
|
_o.PurchaseCountLimit = TableEncryptionService.Convert(this.PurchaseCountLimit, key);
|
2024-12-30 22:20:43 +00:00
|
|
|
_o.PurchaseCountResetType = TableEncryptionService.Convert(this.PurchaseCountResetType, key);
|
2024-04-29 15:52:45 +00:00
|
|
|
_o.BuyReportEventName = TableEncryptionService.Convert(this.BuyReportEventName, key);
|
|
|
|
_o.RestrictBuyWhenInventoryFull = TableEncryptionService.Convert(this.RestrictBuyWhenInventoryFull, key);
|
|
|
|
_o.DisplayTag = TableEncryptionService.Convert(this.DisplayTag, key);
|
|
|
|
_o.ShopUpdateGroupId = TableEncryptionService.Convert(this.ShopUpdateGroupId, key);
|
|
|
|
}
|
|
|
|
public static Offset<SCHALE.Common.FlatData.ShopExcel> Pack(FlatBufferBuilder builder, ShopExcelT _o) {
|
|
|
|
if (_o == null) return default(Offset<SCHALE.Common.FlatData.ShopExcel>);
|
|
|
|
var _GoodsId = default(VectorOffset);
|
|
|
|
if (_o.GoodsId != null) {
|
|
|
|
var __GoodsId = _o.GoodsId.ToArray();
|
|
|
|
_GoodsId = CreateGoodsIdVector(builder, __GoodsId);
|
|
|
|
}
|
|
|
|
var _SalePeriodFrom = _o.SalePeriodFrom == null ? default(StringOffset) : builder.CreateString(_o.SalePeriodFrom);
|
|
|
|
var _SalePeriodTo = _o.SalePeriodTo == null ? default(StringOffset) : builder.CreateString(_o.SalePeriodTo);
|
|
|
|
var _BuyReportEventName = _o.BuyReportEventName == null ? default(StringOffset) : builder.CreateString(_o.BuyReportEventName);
|
|
|
|
return CreateShopExcel(
|
|
|
|
builder,
|
|
|
|
_o.Id,
|
|
|
|
_o.LocalizeEtcId,
|
|
|
|
_o.CategoryType,
|
|
|
|
_o.IsLegacy,
|
|
|
|
_GoodsId,
|
|
|
|
_o.DisplayOrder,
|
|
|
|
_SalePeriodFrom,
|
|
|
|
_SalePeriodTo,
|
|
|
|
_o.PurchaseCooltimeMin,
|
|
|
|
_o.PurchaseCountLimit,
|
2024-12-30 22:20:43 +00:00
|
|
|
_o.PurchaseCountResetType,
|
2024-04-29 15:52:45 +00:00
|
|
|
_BuyReportEventName,
|
|
|
|
_o.RestrictBuyWhenInventoryFull,
|
|
|
|
_o.DisplayTag,
|
|
|
|
_o.ShopUpdateGroupId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public class ShopExcelT
|
|
|
|
{
|
|
|
|
public long Id { get; set; }
|
|
|
|
public uint LocalizeEtcId { get; set; }
|
|
|
|
public SCHALE.Common.FlatData.ShopCategoryType CategoryType { get; set; }
|
|
|
|
public bool IsLegacy { get; set; }
|
|
|
|
public List<long> GoodsId { get; set; }
|
|
|
|
public long DisplayOrder { get; set; }
|
|
|
|
public string SalePeriodFrom { get; set; }
|
|
|
|
public string SalePeriodTo { get; set; }
|
|
|
|
public long PurchaseCooltimeMin { get; set; }
|
|
|
|
public long PurchaseCountLimit { get; set; }
|
2024-12-30 22:20:43 +00:00
|
|
|
public SCHALE.Common.FlatData.PurchaseCountResetType PurchaseCountResetType { get; set; }
|
2024-04-29 15:52:45 +00:00
|
|
|
public string BuyReportEventName { get; set; }
|
|
|
|
public bool RestrictBuyWhenInventoryFull { get; set; }
|
|
|
|
public SCHALE.Common.FlatData.ProductDisplayTag DisplayTag { get; set; }
|
|
|
|
public int ShopUpdateGroupId { get; set; }
|
|
|
|
|
|
|
|
public ShopExcelT() {
|
|
|
|
this.Id = 0;
|
|
|
|
this.LocalizeEtcId = 0;
|
|
|
|
this.CategoryType = SCHALE.Common.FlatData.ShopCategoryType.General;
|
|
|
|
this.IsLegacy = false;
|
|
|
|
this.GoodsId = null;
|
|
|
|
this.DisplayOrder = 0;
|
|
|
|
this.SalePeriodFrom = null;
|
|
|
|
this.SalePeriodTo = null;
|
|
|
|
this.PurchaseCooltimeMin = 0;
|
|
|
|
this.PurchaseCountLimit = 0;
|
2024-12-30 22:20:43 +00:00
|
|
|
this.PurchaseCountResetType = SCHALE.Common.FlatData.PurchaseCountResetType.None;
|
2024-04-29 15:52:45 +00:00
|
|
|
this.BuyReportEventName = null;
|
|
|
|
this.RestrictBuyWhenInventoryFull = false;
|
2024-12-30 22:20:43 +00:00
|
|
|
this.DisplayTag = SCHALE.Common.FlatData.ProductDisplayTag.None;
|
2024-04-29 15:52:45 +00:00
|
|
|
this.ShopUpdateGroupId = 0;
|
|
|
|
}
|
2024-04-21 00:21:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static public class ShopExcelVerify
|
|
|
|
{
|
|
|
|
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
|
|
|
|
{
|
|
|
|
return verifier.VerifyTableStart(tablePos)
|
|
|
|
&& verifier.VerifyField(tablePos, 4 /*Id*/, 8 /*long*/, 8, false)
|
|
|
|
&& verifier.VerifyField(tablePos, 6 /*LocalizeEtcId*/, 4 /*uint*/, 4, false)
|
|
|
|
&& verifier.VerifyField(tablePos, 8 /*CategoryType*/, 4 /*SCHALE.Common.FlatData.ShopCategoryType*/, 4, false)
|
|
|
|
&& verifier.VerifyField(tablePos, 10 /*IsLegacy*/, 1 /*bool*/, 1, false)
|
|
|
|
&& verifier.VerifyVectorOfData(tablePos, 12 /*GoodsId*/, 8 /*long*/, false)
|
|
|
|
&& verifier.VerifyField(tablePos, 14 /*DisplayOrder*/, 8 /*long*/, 8, false)
|
|
|
|
&& verifier.VerifyString(tablePos, 16 /*SalePeriodFrom*/, false)
|
|
|
|
&& verifier.VerifyString(tablePos, 18 /*SalePeriodTo*/, false)
|
|
|
|
&& verifier.VerifyField(tablePos, 20 /*PurchaseCooltimeMin*/, 8 /*long*/, 8, false)
|
|
|
|
&& verifier.VerifyField(tablePos, 22 /*PurchaseCountLimit*/, 8 /*long*/, 8, false)
|
2024-12-30 22:20:43 +00:00
|
|
|
&& verifier.VerifyField(tablePos, 24 /*PurchaseCountResetType*/, 4 /*SCHALE.Common.FlatData.PurchaseCountResetType*/, 4, false)
|
2024-04-21 00:21:57 +00:00
|
|
|
&& verifier.VerifyString(tablePos, 26 /*BuyReportEventName*/, false)
|
|
|
|
&& verifier.VerifyField(tablePos, 28 /*RestrictBuyWhenInventoryFull*/, 1 /*bool*/, 1, false)
|
|
|
|
&& verifier.VerifyField(tablePos, 30 /*DisplayTag*/, 4 /*SCHALE.Common.FlatData.ProductDisplayTag*/, 4, false)
|
|
|
|
&& verifier.VerifyField(tablePos, 32 /*ShopUpdateGroupId*/, 4 /*int*/, 4, false)
|
|
|
|
&& verifier.VerifyTableEnd(tablePos);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|