초기커밋
This commit is contained in:
77
ServerCommon/Doc/OwnerContents/QuestPeriodRepeatCheckDoc.cs
Normal file
77
ServerCommon/Doc/OwnerContents/QuestPeriodRepeatCheckDoc.cs
Normal file
@@ -0,0 +1,77 @@
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
using ServerCore;
|
||||
using ServerBase;
|
||||
using MetaAssets;
|
||||
|
||||
|
||||
namespace ServerCommon;
|
||||
|
||||
public class QuestPeriodRepeatInfo
|
||||
{
|
||||
[JsonProperty("sended_quest")]
|
||||
public ConcurrentDictionary<UInt32, DateTime> m_sended_quest { get; set; } = new();
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class QuestPeriodRepeatAttrib : AttribBase
|
||||
{
|
||||
[JsonProperty("period_repeat_quests")]
|
||||
public ConcurrentDictionary<OncePeriodRangeType, QuestPeriodRepeatInfo> m_period_repeat_quests = new();
|
||||
|
||||
|
||||
public QuestPeriodRepeatAttrib() : base(typeof(QuestPeriodRepeatAttrib).Name)
|
||||
{ }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================================
|
||||
// PK(Partition Key) : "quest_period_repeat#owner_guid"
|
||||
// SK(Sort Key) :
|
||||
// DocType : QuestPeriodRepeatCheckDoc
|
||||
//=============================================================================================
|
||||
public class QuestPeriodRepeatCheckDoc : DynamoDbDocBase
|
||||
{
|
||||
public QuestPeriodRepeatCheckDoc()
|
||||
: base(typeof(QuestPeriodRepeatCheckDoc).Name)
|
||||
{
|
||||
appendAttribWrapperAll();
|
||||
}
|
||||
|
||||
public QuestPeriodRepeatCheckDoc(string guid)
|
||||
: base(typeof(QuestPeriodRepeatCheckDoc).Name)
|
||||
{
|
||||
setCombinationKeyForPK(guid);
|
||||
appendAttribWrapperAll();
|
||||
fillUpPrimaryKey(onMakePK(), onMakeSK());
|
||||
|
||||
}
|
||||
|
||||
private void appendAttribWrapperAll()
|
||||
{
|
||||
appendAttribWrapper(new AttribWrapper<QuestPeriodRepeatAttrib>());
|
||||
}
|
||||
|
||||
protected override string onGetPrefixOfPK()
|
||||
{
|
||||
return "quest_period_repeat#";
|
||||
}
|
||||
|
||||
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