초기커밋
This commit is contained in:
63
ServerCommon/Doc/OwnerContents/PackageLastOrderRecodeDoc.cs
Normal file
63
ServerCommon/Doc/OwnerContents/PackageLastOrderRecodeDoc.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
using ServerBase;
|
||||
|
||||
|
||||
using META_ID = System.UInt32;
|
||||
|
||||
|
||||
namespace ServerCommon;
|
||||
|
||||
public class PackageLastOrderRecodeAttrib : AttribBase
|
||||
{
|
||||
[JsonProperty]
|
||||
public string LastOrderGuid { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty]
|
||||
public DateTime LastBuyTime { get; set; } = new();
|
||||
|
||||
public PackageLastOrderRecodeAttrib()
|
||||
: base(typeof(PackageLastOrderRecodeAttrib).Name)
|
||||
{ }
|
||||
}
|
||||
|
||||
//=============================================================================================
|
||||
// PK(Partition Key) : "package_lastorder_recode#user_guid"
|
||||
// SK(Sort Key) : ""
|
||||
// DocType : PackageLastOrderRecodeDoc
|
||||
// Attrib : PackageLastOrderRecodeAttrib
|
||||
// ...
|
||||
//=============================================================================================
|
||||
public class PackageLastOrderRecodeDoc : DynamoDbDocBase
|
||||
{
|
||||
private static string getPrefixOfPK() { return "package_lastorder_recode#"; }
|
||||
|
||||
public PackageLastOrderRecodeDoc()
|
||||
: base(typeof(PackageLastOrderRecodeDoc).Name)
|
||||
{
|
||||
appendAttribWrapperAll();
|
||||
}
|
||||
|
||||
public PackageLastOrderRecodeDoc(string ownerGuid)
|
||||
: base(typeof(PackageLastOrderRecodeDoc).Name)
|
||||
{
|
||||
setCombinationKeyForPK(ownerGuid);
|
||||
|
||||
appendAttribWrapperAll();
|
||||
|
||||
fillUpPrimaryKey(onMakePK(), onMakeSK());
|
||||
|
||||
setExceptionHandler(new DynamoDbQueryExceptionNotifier.ExceptionHandler(DynamoDbQueryExceptionNotifier.ConditionalCheckFailed, ServerErrorCode.PackageLastOrderRecodeDocException));
|
||||
}
|
||||
|
||||
private void appendAttribWrapperAll()
|
||||
{
|
||||
appendAttribWrapper(new AttribWrapper<PackageLastOrderRecodeAttrib>());
|
||||
}
|
||||
|
||||
protected override string onGetPrefixOfPK()
|
||||
{
|
||||
return getPrefixOfPK();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user