64 lines
1.7 KiB
C#
64 lines
1.7 KiB
C#
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();
|
|
}
|
|
}
|