72 lines
1.9 KiB
C#
72 lines
1.9 KiB
C#
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();
|
|
}
|
|
}
|
|
}
|