초기커밋

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,72 @@
using Newtonsoft.Json;
using ServerCore;
using ServerBase;
using RESERVATION_GUID = System.String;
namespace ServerCommon;
public class TaskReservationAttrib : AttribBase
{
[JsonProperty]
public RESERVATION_GUID ReservationGuid { get; set; } = string.Empty;
[JsonProperty]
public TaskReservationActionType ReservationType { get; set; } = TaskReservationActionType.None;
[JsonProperty]
public string JsonValue { get; set; } = string.Empty;
public TaskReservationAttrib()
: base(typeof(TaskReservationAttrib).Name)
{ }
}
//=============================================================================================
// PK(Partition Key) : "taskReservation#owner_guid"
// SK(Sort Key) : "reservation_guid"
// DocType : TaskReservationDoc
// Attrib : TaskReservationAttrib
// ...
//=============================================================================================
public class TaskReservationDoc : DynamoDbDocBase
{
private static string getPrefixOfPK() { return "taskReservation#"; }
public TaskReservationDoc()
: base(typeof(TaskReservationDoc).Name)
{
appendAttribWrapperAll();
}
public TaskReservationDoc(string ownerGuid, RESERVATION_GUID reservationGuid)
: base(typeof(TaskReservationDoc).Name)
{
setCombinationKeyForPKSK(ownerGuid, reservationGuid);
appendAttribWrapperAll();
fillUpPrimaryKey(onMakePK(), onMakeSK());
}
private void appendAttribWrapperAll()
{
appendAttribWrapper(new AttribWrapper<TaskReservationAttrib>());
}
protected override string onGetPrefixOfPK()
{
return getPrefixOfPK();
}
protected override ServerErrorCode onCheckAndSetSK(string sortKey)
{
getPrimaryKey().fillUpSK(sortKey);
setCombinationKeyForSK(sortKey);
return ServerErrorCode.Success;
}
}