using System.Collections.Concurrent; using Newtonsoft.Json; using ServerCore; using ServerBase; using MetaAssets; namespace ServerCommon; public class QuestPeriodRepeatInfo { [JsonProperty("sended_quest")] public ConcurrentDictionary m_sended_quest { get; set; } = new(); } public class QuestPeriodRepeatAttrib : AttribBase { [JsonProperty("period_repeat_quests")] public ConcurrentDictionary 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()); } 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; } }