초기커밋

This commit is contained in:
2025-05-01 07:20:41 +09:00
commit 98bb2e3c5c
2747 changed files with 646947 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
using Newtonsoft.Json;
using ServerCore;
using ServerBase;
using USER_GUID = System.String;
namespace ServerCommon;
public class CaliumAttrib : AttribBase
{
[JsonProperty("daily_calium")]
[JsonConverter(typeof(StringToDoubleEpsilonRoundConverter))]
public double DailyCalium { get; set; } = 0.0;
[JsonProperty("provided_date")]
public DateTime ProvidedDate { get; set; } = DateTimeHelper.MinTime;
public CaliumAttrib() : base(nameof(CaliumAttrib), false) {}
}
//=============================================================================================
// PK(Partition Key) : "calium#user_guid"
// SK(Sort Key) : ""
// DocType : CaliumDoc
// CaliumAttrib : {}
// ...
//=============================================================================================
public class CaliumDoc : DynamoDbDocBase
{
private static string getPrefixOfPK() { return "calium#"; }
private static string getPrefixOfSK() { return ""; }
public CaliumDoc() : base(nameof(CaliumDoc))
{
appendAttribWrapperAll();
}
public CaliumDoc(USER_GUID userGuid) : base(nameof(CaliumDoc))
{
setCombinationKeyForPK(userGuid);
appendAttribWrapperAll();
fillUpPrimaryKey(onMakePK(), onMakeSK());
}
protected override string onGetPrefixOfPK()
{
return getPrefixOfPK();
}
private void appendAttribWrapperAll()
{
appendAttribWrapper(new AttribWrapper<CaliumAttrib>());
}
}