초기커밋
This commit is contained in:
71
ServerCommon/Doc/UserBase/UserContentsSettingDoc.cs
Normal file
71
ServerCommon/Doc/UserBase/UserContentsSettingDoc.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
using ServerCore; using ServerBase;
|
||||
|
||||
|
||||
using OWNER_GUID = System.String;
|
||||
|
||||
|
||||
namespace ServerCommon
|
||||
{
|
||||
public class UserContentsSettingAttrib : AttribBase
|
||||
{
|
||||
[JsonProperty("myhome_slot_open_count")]
|
||||
public int MyhomeSlotOpenCount { get; set; } = 0;
|
||||
|
||||
[JsonProperty("beacon_app_profile_upload_time")]
|
||||
public DateTime BeaconAppProfileUploadTime { get; set; } = new();
|
||||
|
||||
public UserContentsSettingAttrib()
|
||||
: base(typeof(UserContentsSettingAttrib).Name)
|
||||
{ }
|
||||
}
|
||||
|
||||
//=============================================================================================
|
||||
// PK(Partition Key) : "user_contents_setting#user_guid"
|
||||
// SK(Sort Key) : ""
|
||||
// DocType : UserContentsSettingDoc
|
||||
// UserContentsSettingAttrib : {}
|
||||
// ...
|
||||
//=============================================================================================
|
||||
|
||||
public class UserContentsSettingDoc : DynamoDbDocBase
|
||||
{
|
||||
private static string getPrefixOfPK() { return "user_contents_setting#"; }
|
||||
private static string getPrefixOfSK() { return ""; }
|
||||
|
||||
public UserContentsSettingDoc()
|
||||
: base(typeof(UserContentsSettingDoc).Name)
|
||||
{
|
||||
appendAttribWrapperAll();
|
||||
}
|
||||
|
||||
public UserContentsSettingDoc(string userGuid)
|
||||
: base(typeof(UserContentsSettingDoc).Name)
|
||||
{
|
||||
setCombinationKeyForPK(userGuid);
|
||||
|
||||
appendAttribWrapperAll();
|
||||
|
||||
fillUpPrimaryKey(onMakePK(), onMakeSK());
|
||||
}
|
||||
|
||||
private void appendAttribWrapperAll()
|
||||
{
|
||||
appendAttribWrapper(new AttribWrapper<UserContentsSettingAttrib>());
|
||||
}
|
||||
|
||||
protected override string onGetPrefixOfPK()
|
||||
{
|
||||
return getPrefixOfPK();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user