Files
caliverse_server/ServerCommon/Doc/Global/CaliumConverterDoc.cs
2025-05-01 07:20:41 +09:00

61 lines
1.7 KiB
C#

using Newtonsoft.Json;
using ServerCore;
using ServerBase;
using DYNAMO_DB_TABLE_FULL_NAME = System.String;
namespace ServerCommon;
public class CaliumConverterAttrib : AttribBase
{
[JsonProperty("cailum")] public double Calium { get; set; }
[JsonProperty("last_fill_up_date")] public string LastFillUpDate { get; set; } = string.Empty;
public CaliumConverterAttrib() : base(nameof(CaliumConverterAttrib), false)
{
}
}
//=============================================================================================
// Primary Key : Deprecated -> Migration 에서 쓰고 있음 ( 추후 삭제 필요 )
// PK(Partition Key) : "caliumconverter#total"
// SK(Sort Key) : ""
// DocType : CaliumConverterDoc
// Attrib : CaliumConverterAttrib
// ...
//=============================================================================================
public class CaliumConverterDoc : DynamoDbDocBase
{
public static string pk = "caliumconverter#total";
private static string getPrefixOfPK() => "";
private static string getPrefixOfSK() => "";
public CaliumConverterDoc() : base(nameof(CaliumConverterDoc))
{
fillUpPrimaryKey(onMakePK(), onMakeSK());
appendAttribWrapperAll();
}
private void appendAttribWrapperAll()
{
appendAttribWrapper(new AttribWrapper<CaliumConverterAttrib>());
}
protected override string onGetPrefixOfPK() => getPrefixOfPK();
protected override string onMakePK()
{
return pk;
}
protected override string onMakeSK()
{
return $"{onGetPrefixOfSK()}{getCombinationKeyForSK()}";
}
}