using Google.Protobuf.WellKnownTypes; using Newtonsoft.Json; using ServerCore; using ServerBase; namespace ServerCommon; public class RepeatQuestAttrib : AttribBase { [JsonProperty("next_allocate_time")] public DateTime m_next_allocate_time { get; set; } = new(); [JsonProperty("is_checking")] public Int32 m_is_checking { get; set; } = 0; public RepeatQuestAttrib() : base(typeof(RepeatQuestAttrib).Name) {} } //============================================================================================= // PK(Partition Key) : "repeat_quest#owner_guid" // SK(Sort Key) : // DocType : RepeatQuestDoc // RepeatQuestAttrib : {} // ... //============================================================================================= public class RepeatQuestDoc : DynamoDbDocBase { public RepeatQuestDoc() : base(typeof(RepeatQuestDoc).Name) { appendAttribWrapper(new AttribWrapper()); } public RepeatQuestDoc(string guid) : base(typeof(RepeatQuestDoc).Name) { setCombinationKeyForPK(guid); fillUpPrimaryKey(onMakePK(), onMakeSK()); appendAttribWrapper(new AttribWrapper()); } protected override string onGetPrefixOfPK() { return "repeat_quest#"; } protected override string onMakePK() { return $"{onGetPrefixOfPK()}{getCombinationKeyForPK()}"; } protected override ServerErrorCode onCheckAndSetPK(string pk) { getPrimaryKey().fillUpPK(pk); return ServerErrorCode.Success; } }