58 lines
1.8 KiB
C#
58 lines
1.8 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 CharProfileAttr
|
|
// {
|
|
// public string SNSLick = string.Empty;
|
|
// public string Message = string.Empty;
|
|
// }
|
|
|
|
// public class CharProfileEntity
|
|
// {
|
|
// public string PK_Guid { get; private set; } = string.Empty;
|
|
// public string SK_Empty { get; private set; } = string.Empty;
|
|
|
|
// public CharProfileAttr Attr { get; private set; } = new();
|
|
|
|
// public CharProfileEntity() { }
|
|
|
|
// public CharProfileEntity(Document document)
|
|
// {
|
|
// ReadFrom(document);
|
|
// }
|
|
|
|
// public bool ReadFrom(Document document)
|
|
// {
|
|
// PK_Guid = document["PK"].AsString().Replace(MainDB.GetPKPrefix(EEntityType.CharProfile), "");
|
|
// SK_Empty = document["SK"].AsString().Replace(MainDB.GetSKPrefix(EEntityType.CharProfile), "");
|
|
|
|
// CharProfileAttr? attr = JsonConvert.DeserializeObject<CharProfileAttr>(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.CharProfile, PK_Guid);
|
|
// document["SK"] = MainDB.MakeSK(EEntityType.CharProfile, SK_Empty);
|
|
// document["Attr"] = JsonConvert.SerializeObject(Attr);
|
|
// return document;
|
|
// }
|
|
// }
|
|
//}
|