66 lines
1.7 KiB
C#
66 lines
1.7 KiB
C#
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;
|
|
}
|
|
} |