초기커밋
This commit is contained in:
61
ServerCommon/Doc/OwnerContents/AiChatDoc.cs
Normal file
61
ServerCommon/Doc/OwnerContents/AiChatDoc.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
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<AiChatAttrib>());
|
||||
}
|
||||
|
||||
protected override string onGetPrefixOfPK()
|
||||
{
|
||||
return getPrefixOfPK();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user