초기커밋

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,83 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ServerCore; using ServerBase;
using META_ID = System.UInt32;
using OWNER_GUID = System.String;
namespace ServerCommon
{
public class MyHomeAttrib : AttribBase
{
[JsonProperty("myhome_guid")]
public string MyhomeGuid { get; set; } = string.Empty;
[JsonProperty("myhome_meta_id")]
public META_ID MyHomeMetaId { get; set; } = 0;
[JsonProperty("myhome_name")]
public string MyhomeName { get; set; } = string.Empty;
[JsonProperty("selected_flag")]
public UInt16 SelectedFlag { get; set; } = 0;
[JsonProperty("myhome_ugc_info_s3_key")]
public string MyhomeUgcInfoS3FileName { get; set; } = string.Empty;
public MyHomeAttrib()
: base(typeof(MyHomeAttrib).Name)
{ }
}
//=============================================================================================
// PK(Partition Key) : "my_home#user_guid"
// SK(Sort Key) : "my_home_guid"
// DocType : MyHomeDoc
// MyHomeAttrib : {}
// ...
//=============================================================================================
public class MyhomeDoc : DynamoDbDocBase
{
private static string getPrefixOfPK() { return "my_home#"; }
private static string getPrefixOfSK() { return ""; }
public MyhomeDoc()
: base(typeof(MyhomeDoc).Name)
{
appendAttribWrapperAll();
}
public MyhomeDoc(string userGuid, string myhomeGuid)
: base(typeof(MyhomeDoc).Name)
{
setCombinationKeyForPK(userGuid);
setCombinationKeyForSK(myhomeGuid);
appendAttribWrapperAll();
fillUpPrimaryKey(onMakePK(), onMakeSK());
}
private void appendAttribWrapperAll()
{
appendAttribWrapper(new AttribWrapper<MyHomeAttrib>());
}
protected override string onGetPrefixOfPK()
{
return getPrefixOfPK();
}
protected override ServerErrorCode onCheckAndSetSK(string sortKey)
{
getPrimaryKey().fillUpSK(sortKey);
setCombinationKeyForSK(sortKey);
return ServerErrorCode.Success;
}
}
}