67 lines
1.6 KiB
C#
67 lines
1.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
using ServerCore;
|
|
using ServerBase;
|
|
|
|
|
|
namespace ServerCommon;
|
|
|
|
public class GameOptionAttrib : AttribBase
|
|
{
|
|
[JsonProperty]
|
|
public string options { get; set; } = string.Empty;
|
|
|
|
public GameOptionAttrib()
|
|
: base(typeof(GameOptionAttrib).Name)
|
|
{ }
|
|
}
|
|
|
|
//=============================================================================================
|
|
// PK(Partition Key) : "game_option#user_guid"
|
|
// SK(Sort Key) : ""
|
|
// DocType : GameOptionDoc
|
|
// GameOptionAttrib : {}
|
|
// ...
|
|
//=============================================================================================
|
|
|
|
public class GameOptionDoc : DynamoDbDocBase
|
|
{
|
|
private static string getPrefixOfPK() { return "game_option#"; }
|
|
|
|
public GameOptionDoc()
|
|
: base(typeof(GameOptionDoc).Name)
|
|
{
|
|
appendAttribWrapperAll();
|
|
}
|
|
|
|
public GameOptionDoc(string ownerGuid)
|
|
: base(typeof(GameOptionDoc).Name)
|
|
{
|
|
setCombinationKeyForPK(ownerGuid);
|
|
|
|
appendAttribWrapperAll();
|
|
|
|
fillUpPrimaryKey(onMakePK(), onMakeSK());
|
|
|
|
setExceptionHandler(new DynamoDbQueryExceptionNotifier.ExceptionHandler(DynamoDbQueryExceptionNotifier.ConditionalCheckFailed, ServerErrorCode.GameOptionDocException));
|
|
}
|
|
|
|
private void appendAttribWrapperAll()
|
|
{
|
|
appendAttribWrapper(new AttribWrapper<GameOptionAttrib>());
|
|
}
|
|
|
|
protected override string onGetPrefixOfPK()
|
|
{
|
|
return getPrefixOfPK();
|
|
}
|
|
}
|