using Newtonsoft.Json; using ServerCore; using ServerBase; using META_ID = System.UInt32; namespace ServerCommon; public class AiChatAttrib : AttribBase { [JsonProperty] public DateTime LastIncentiveProvideTime { get; set; } = new(); public AiChatAttrib() : base(typeof(AiChatAttrib).Name) { } } //============================================================================================= // PK(Partition Key) : "aichat#user_guid" // SK(Sort Key) : "" // DocType : AiChatDoc // Attrib : AiChatAttrib // ... //============================================================================================= public class AiChatDoc : DynamoDbDocBase { private static string getPrefixOfPK() { return "aichat#"; } public AiChatDoc() : base(typeof(AiChatDoc).Name) { appendAttribWrapperAll(); } public AiChatDoc(string ownerGuid) : base(typeof(AiChatDoc).Name) { setCombinationKeyForPK(ownerGuid); appendAttribWrapperAll(); fillUpPrimaryKey(onMakePK(), onMakeSK()); setExceptionHandler(new DynamoDbQueryExceptionNotifier.ExceptionHandler(DynamoDbQueryExceptionNotifier.ConditionalCheckFailed, ServerErrorCode.AiChatDocException)); } private void appendAttribWrapperAll() { appendAttribWrapper(new AttribWrapper()); } protected override string onGetPrefixOfPK() { return getPrefixOfPK(); } }