72 lines
2.3 KiB
C#
72 lines
2.3 KiB
C#
//using Newtonsoft.Json;
|
|
//using ServerCore; using ServerBase;
|
|
//using System;
|
|
//using System.Collections.Generic;
|
|
//using System.Linq;
|
|
//using System.Text;
|
|
//using System.Threading.Tasks;
|
|
//using Amazon.DynamoDBv2.DocumentModel;
|
|
|
|
//namespace ServerCommon.DB
|
|
//{
|
|
// public class TattooSlotInfo
|
|
// {
|
|
// public string ItemGuid = string.Empty;
|
|
// public bool IsVisible = true;
|
|
// }
|
|
|
|
// public class TattooSlotAttr
|
|
// {
|
|
// public TattooSlotInfo[] slotInfos = Enumerable.Repeat(new TattooSlotInfo(), Constant.MAX_TATTOO_SLOT).ToArray();
|
|
// }
|
|
|
|
// public class TattooSlotEntity
|
|
// {
|
|
// /// <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 TattooSlotAttr Attr { get; private set; } = new();
|
|
|
|
// public TattooSlotEntity() { }
|
|
|
|
// public TattooSlotEntity(Document document)
|
|
// {
|
|
// if (!ReadFrom(document))
|
|
// {
|
|
// throw new Exception("Attr DeserializeObject error");
|
|
// }
|
|
// }
|
|
|
|
// public bool ReadFrom(Document document)
|
|
// {
|
|
// PK_Guid = document["PK"].AsString().Replace(MainDB.GetPKPrefix(EEntityType.TattooSlot), "");
|
|
// SK_Empty = document["SK"].AsString().Replace(MainDB.GetSKPrefix(EEntityType.TattooSlot), "");
|
|
|
|
// var attr = JsonConvert.DeserializeObject<TattooSlotAttr>(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.TattooSlot, PK_Guid);
|
|
// document["SK"] = MainDB.MakeSK(EEntityType.TattooSlot, SK_Empty);
|
|
// document["Attr"] = JsonConvert.SerializeObject(Attr);
|
|
// return document;
|
|
// }
|
|
// }
|
|
//}
|