69 lines
1.7 KiB
C#
69 lines
1.7 KiB
C#
using MetaAssets;
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
using ServerCore;
|
|
using ServerBase;
|
|
|
|
|
|
|
|
namespace ServerCommon;
|
|
|
|
|
|
public class DailyQuestCheckAttrib : AttribBase
|
|
{
|
|
[JsonProperty("daily_sended_quest")]
|
|
public HashSet<UInt32> m_daily_sended_quest { get; set; } = new();
|
|
|
|
[JsonProperty("next_refresh_time")]
|
|
public DateTime m_next_refresh_time { get; set; } = DateTime.Now;
|
|
|
|
public DailyQuestCheckAttrib()
|
|
: base(typeof(DailyQuestCheckAttrib).Name)
|
|
{ }
|
|
}
|
|
|
|
//=============================================================================================
|
|
// PK(Partition Key) : "daily_quest_check#owner_guid"
|
|
// SK(Sort Key) :
|
|
// DocType : DailyQuestCheckDoc
|
|
//=============================================================================================
|
|
public class DailyQuestCheckDoc : DynamoDbDocBase
|
|
{
|
|
public DailyQuestCheckDoc()
|
|
: base(typeof(DailyQuestCheckDoc).Name)
|
|
{
|
|
appendAttribWrapperAll();
|
|
}
|
|
|
|
public DailyQuestCheckDoc(string guid)
|
|
: base(typeof(DailyQuestCheckDoc).Name)
|
|
{
|
|
setCombinationKeyForPK(guid);
|
|
appendAttribWrapperAll();
|
|
fillUpPrimaryKey(onMakePK(), onMakeSK());
|
|
|
|
}
|
|
|
|
|
|
private void appendAttribWrapperAll()
|
|
{
|
|
appendAttribWrapper(new AttribWrapper<DailyQuestCheckAttrib>());
|
|
}
|
|
|
|
protected override string onGetPrefixOfPK()
|
|
{
|
|
return "daily_quest_check#";
|
|
}
|
|
|
|
protected override string onMakePK()
|
|
{
|
|
return $"{onGetPrefixOfPK()}{getCombinationKeyForPK()}";
|
|
}
|
|
|
|
protected override ServerErrorCode onCheckAndSetPK(string pk)
|
|
{
|
|
getPrimaryKey().fillUpPK(pk);
|
|
return ServerErrorCode.Success;
|
|
}
|
|
} |