Files
2025-05-01 07:20:41 +09:00

62 lines
1.5 KiB
C#

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();
}
}