//using Amazon.DynamoDBv2.DocumentModel; //using Newtonsoft.Json; //using ServerCore; using ServerBase; //namespace ServerCommon.DB //{ // public enum InvenSlot // { // LOCAL_ETC = 0, // LOCAL_COSTUME = 1, // LOCAL_INTERIOR = 2, // LOCAL_BEAUTY = 3, // LOCAL_TATTOO = 4, // NFT_ETC = 5, // NFT_COSTUME = 6, // NFT_INTERIOR = 7, // NFT_BEAUTY = 8, // NFT_TATTOO = 9, // } // public class InventoryAttr // { // public HashSet[] InventoryTaps = { new(), new(), new(), new(), new(), new(), new(), new(), new(), new() }; // } // public class InventoryEntity // { // /// // /// DB PK에 사용되는 charGuid // /// // public string PK_Guid { get; private set; } = string.Empty; // /// // /// DB SK에 사용되지 않음. 빈값임 // /// // public string SK_Empty { get; private set; } = string.Empty; // public InventoryAttr Attr { get; private set; } = new(); // public InventoryEntity() { } // public InventoryEntity(Document document) // { // ReadFrom(document); // } // public bool ReadFrom(Document document) // { // PK_Guid = document["PK"].AsString().Replace(MainDB.GetPKPrefix(EEntityType.Inventory), ""); // SK_Empty = document["SK"].AsString().Replace(MainDB.GetSKPrefix(EEntityType.Inventory), ""); // var attr = JsonConvert.DeserializeObject(document["Attr"].AsString()); // if (attr == null) // { // Log.getLogger().error($"{PK_Guid} Attr DeserializeObject error"); // return false; // } // Attr = attr; // return true; // } // public Document DocumentForUpdate() // { // var document = new Document(); // document["PK"] = MainDB.MakePK(EEntityType.Inventory, PK_Guid); // document["SK"] = MainDB.MakeSK(EEntityType.Inventory, SK_Empty); // document["Attr"] = JsonConvert.SerializeObject(Attr); // return document; // } // public void Clear() // { // foreach (var InventoryTap in Attr.InventoryTaps) // { // InventoryTap.Clear(); // } // } // } //}