초기커밋
This commit is contained in:
79
ServerCommon/z.Backup/InventoryEntity.cs
Normal file
79
ServerCommon/z.Backup/InventoryEntity.cs
Normal file
@@ -0,0 +1,79 @@
|
||||
//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<string>[] InventoryTaps = { new(), new(), new(), new(), new(), new(), new(), new(), new(), new() };
|
||||
// }
|
||||
|
||||
// public class InventoryEntity
|
||||
// {
|
||||
// /// <summary>
|
||||
// /// DB PK에 사용되는 charGuid
|
||||
// /// </summary>
|
||||
// public string PK_Guid { get; private set; } = string.Empty;
|
||||
// /// <summary>
|
||||
// /// DB SK에 사용되지 않음. 빈값임
|
||||
// /// </summary>
|
||||
// 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<InventoryAttr>(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();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
Reference in New Issue
Block a user