using Newtonsoft.Json; using ServerCore; using ServerBase; namespace ServerCommon; public class UgqDailyRewardCountAttrib : AttribBase { [JsonProperty("daily_reward_count")] public Dictionary 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()); } 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; } }