56 lines
1.8 KiB
C#
56 lines
1.8 KiB
C#
//using Newtonsoft.Json;
|
|
//using Amazon.DynamoDBv2.DocumentModel;
|
|
//using System;
|
|
//using System.Collections.Concurrent;
|
|
//using System.Collections.Generic;
|
|
//using System.Linq;
|
|
//using System.Text;
|
|
//using System.Threading.Tasks;
|
|
//using ServerCore; using ServerBase;
|
|
|
|
//namespace ServerCommon.DB
|
|
//{
|
|
// public class AccountGameOptionAttr
|
|
// {
|
|
// public string options = string.Empty;
|
|
// }
|
|
|
|
// public class AccountGameOptionEntity
|
|
// {
|
|
// public string PK_Guid { get; private set; } = string.Empty;
|
|
// public string SK_Empty { get; private set; } = string.Empty;
|
|
// public AccountGameOptionAttr Attr { get; private set; } = new();
|
|
|
|
// public AccountGameOptionEntity() { }
|
|
// public AccountGameOptionEntity(Document document)
|
|
// {
|
|
// ReadFrom(document);
|
|
// }
|
|
|
|
// public bool ReadFrom(Document document)
|
|
// {
|
|
// PK_Guid = document["PK"].AsString().Replace(MainDB.GetPKPrefix(EEntityType.GameOption), "");
|
|
// SK_Empty = document["SK"].AsString().Replace(MainDB.GetSKPrefix(EEntityType.GameOption), "");
|
|
|
|
// AccountGameOptionAttr? attr = JsonConvert.DeserializeObject<AccountGameOptionAttr>(document["Attr"].AsString());
|
|
// if (attr == null)
|
|
// {
|
|
// return false;
|
|
// }
|
|
|
|
// Attr = attr;
|
|
|
|
// return true;
|
|
// }
|
|
|
|
// public Document DocumentForUpdate()
|
|
// {
|
|
// var document = new Document();
|
|
// document["PK"] = MainDB.MakePK(EEntityType.GameOption, PK_Guid);
|
|
// document["SK"] = MainDB.MakeSK(EEntityType.GameOption, SK_Empty);
|
|
// document["Attr"] = JsonConvert.SerializeObject(Attr);
|
|
// return document;
|
|
// }
|
|
// }
|
|
//}
|