초기커밋
This commit is contained in:
66
ServerCommon/Doc/OwnerContents/GameOptionDoc.cs
Normal file
66
ServerCommon/Doc/OwnerContents/GameOptionDoc.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user