초기커밋
This commit is contained in:
61
ServerCommon/Doc/OwnerContents/RepeatQuestDoc.cs
Normal file
61
ServerCommon/Doc/OwnerContents/RepeatQuestDoc.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using Google.Protobuf.WellKnownTypes;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
using ServerCore;
|
||||
using ServerBase;
|
||||
|
||||
|
||||
namespace ServerCommon;
|
||||
|
||||
public class RepeatQuestAttrib : AttribBase
|
||||
{
|
||||
[JsonProperty("next_allocate_time")]
|
||||
public DateTime m_next_allocate_time { get; set; } = new();
|
||||
[JsonProperty("is_checking")]
|
||||
public Int32 m_is_checking { get; set; } = 0;
|
||||
|
||||
public RepeatQuestAttrib()
|
||||
: base(typeof(RepeatQuestAttrib).Name)
|
||||
{}
|
||||
}
|
||||
|
||||
//=============================================================================================
|
||||
// PK(Partition Key) : "repeat_quest#owner_guid"
|
||||
// SK(Sort Key) :
|
||||
// DocType : RepeatQuestDoc
|
||||
// RepeatQuestAttrib : {}
|
||||
// ...
|
||||
//=============================================================================================
|
||||
public class RepeatQuestDoc : DynamoDbDocBase
|
||||
{
|
||||
public RepeatQuestDoc()
|
||||
: base(typeof(RepeatQuestDoc).Name)
|
||||
{
|
||||
appendAttribWrapper(new AttribWrapper<RepeatQuestAttrib>());
|
||||
}
|
||||
|
||||
public RepeatQuestDoc(string guid)
|
||||
: base(typeof(RepeatQuestDoc).Name)
|
||||
{
|
||||
setCombinationKeyForPK(guid);
|
||||
fillUpPrimaryKey(onMakePK(), onMakeSK());
|
||||
appendAttribWrapper(new AttribWrapper<RepeatQuestAttrib>());
|
||||
}
|
||||
|
||||
protected override string onGetPrefixOfPK()
|
||||
{
|
||||
return "repeat_quest#";
|
||||
}
|
||||
|
||||
protected override string onMakePK()
|
||||
{
|
||||
return $"{onGetPrefixOfPK()}{getCombinationKeyForPK()}";
|
||||
}
|
||||
|
||||
protected override ServerErrorCode onCheckAndSetPK(string pk)
|
||||
{
|
||||
getPrimaryKey().fillUpPK(pk);
|
||||
return ServerErrorCode.Success;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user