초기커밋
This commit is contained in:
66
ServerCommon/Doc/OwnerContents/UgqDailyRewardCountDoc.cs
Normal file
66
ServerCommon/Doc/OwnerContents/UgqDailyRewardCountDoc.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
using ServerCore;
|
||||
using ServerBase;
|
||||
|
||||
|
||||
namespace ServerCommon;
|
||||
|
||||
public class UgqDailyRewardCountAttrib : AttribBase
|
||||
{
|
||||
[JsonProperty("daily_reward_count")]
|
||||
public Dictionary<UgqGradeType, Int32> m_ugq_daily_reward_count { get; set; } = new();
|
||||
|
||||
[JsonProperty("next_refresh_time")]
|
||||
public DateTime m_next_refresh_time { get; set; } = DateTime.Now;
|
||||
|
||||
public UgqDailyRewardCountAttrib()
|
||||
: base(typeof(UgqDailyRewardCountAttrib).Name)
|
||||
{ }
|
||||
}
|
||||
|
||||
|
||||
//=============================================================================================
|
||||
// PK(Partition Key) : "ugq_daily_reward_count#owner_guid"
|
||||
// SK(Sort Key) :
|
||||
// DocType : UgqDailyRewardCountDoc
|
||||
//=============================================================================================
|
||||
|
||||
public class UgqDailyRewardCountDoc : DynamoDbDocBase
|
||||
{
|
||||
public UgqDailyRewardCountDoc()
|
||||
: base(typeof(UgqDailyRewardCountDoc).Name)
|
||||
{
|
||||
appendAttribWrapperAll();
|
||||
}
|
||||
|
||||
public UgqDailyRewardCountDoc(string guid)
|
||||
: base(typeof(UgqDailyRewardCountDoc).Name)
|
||||
{
|
||||
setCombinationKeyForPK(guid);
|
||||
appendAttribWrapperAll();
|
||||
fillUpPrimaryKey(onMakePK(), onMakeSK());
|
||||
}
|
||||
|
||||
private void appendAttribWrapperAll()
|
||||
{
|
||||
appendAttribWrapper(new AttribWrapper<UgqDailyRewardCountAttrib>());
|
||||
}
|
||||
|
||||
protected override string onGetPrefixOfPK()
|
||||
{
|
||||
return "ugq_daily_reward_count#";
|
||||
}
|
||||
|
||||
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