초기커밋
This commit is contained in:
74
ServerCommon/Doc/OwnerContents/EscapePositionDoc.cs
Normal file
74
ServerCommon/Doc/OwnerContents/EscapePositionDoc.cs
Normal file
@@ -0,0 +1,74 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
using ServerCore; using ServerBase;
|
||||
|
||||
|
||||
using SESSION_ID = System.Int32;
|
||||
using META_ID = System.UInt32;
|
||||
using ENTITY_GUID = System.String;
|
||||
using ACCOUNT_ID = System.String;
|
||||
using OWNER_GUID = System.String;
|
||||
using USER_GUID = System.String;
|
||||
using CHARACTER_GUID = System.String;
|
||||
using ITEM_GUID = System.String;
|
||||
using Google.Protobuf.WellKnownTypes;
|
||||
|
||||
namespace ServerCommon
|
||||
{
|
||||
public class EscapePositionAttrib : AttribBase
|
||||
{
|
||||
[JsonProperty("AvailableTime")]
|
||||
public DateTime escape_available_time = new();
|
||||
|
||||
public EscapePositionAttrib()
|
||||
: base(typeof(EscapePositionAttrib).Name)
|
||||
{ }
|
||||
}
|
||||
|
||||
//=============================================================================================
|
||||
// PK(Partition Key) : "escape_position#user_guid"
|
||||
// SK(Sort Key) : ""
|
||||
// DocType : EscapePositionDoc
|
||||
// EscapePositionAttrib : {}
|
||||
// ...
|
||||
//=============================================================================================
|
||||
|
||||
public class EscapePositionDoc : DynamoDbDocBase
|
||||
{
|
||||
private static string getPrefixOfPK() { return "escape_position#"; }
|
||||
|
||||
public EscapePositionDoc()
|
||||
: base(typeof(EscapePositionDoc).Name)
|
||||
{
|
||||
appendAttribWrapperAll();
|
||||
}
|
||||
|
||||
public EscapePositionDoc(string ownerGuid)
|
||||
: base(typeof(EscapePositionDoc).Name)
|
||||
{
|
||||
setCombinationKeyForPK(ownerGuid);
|
||||
|
||||
appendAttribWrapperAll();
|
||||
|
||||
fillUpPrimaryKey(onMakePK(), onMakeSK());
|
||||
}
|
||||
|
||||
private void appendAttribWrapperAll()
|
||||
{
|
||||
appendAttribWrapper(new AttribWrapper<EscapePositionAttrib>());
|
||||
}
|
||||
|
||||
protected override string onGetPrefixOfPK()
|
||||
{
|
||||
return getPrefixOfPK();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user