98 lines
2.8 KiB
C#
98 lines
2.8 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 SESSION_ID = System.Int32;
|
|
using META_ID = System.UInt32;
|
|
using ENTITY_GUID = System.String;
|
|
using ACCOUNT_ID = System.String;
|
|
using OWNER_GUID = System.String;
|
|
using USER_GUID = System.String;
|
|
using CHARACTER_GUID = System.String;
|
|
using UGC_NPC_META_GUID = System.String;
|
|
using ITEM_GUID = System.String;
|
|
|
|
|
|
|
|
namespace ServerCommon;
|
|
|
|
public class UgcNpcLikeSelecteeCountAttrib : AttribBase
|
|
{
|
|
[JsonProperty("owner_guid")]
|
|
public OWNER_GUID OwnerGuid { get; set; } = string.Empty;
|
|
|
|
[JsonProperty("owner_entity_type")]
|
|
public OwnerEntityType OwnerEntityType { get; set; } = OwnerEntityType.None;
|
|
|
|
[JsonProperty("like_count")]
|
|
public Int32 LikeCount { get; set; } = 0;
|
|
|
|
public UgcNpcLikeSelecteeCountAttrib()
|
|
: base(typeof(UgcNpcLikeSelecteeCountAttrib).Name, false)
|
|
{ }
|
|
}
|
|
|
|
//=============================================================================================
|
|
// Primary Key
|
|
// PK(Partition Key) : "ugc_npc_like_selectee_count#owner_guid" [owner_guid : ugc_npc_meta_guid]
|
|
// SK(Sort Key) : "empty"
|
|
// DocType : UgcNpcLikeCountDoc
|
|
// ItemAttrib : {}
|
|
// ...
|
|
//=============================================================================================
|
|
public class UgcNpcLikeSelecteeCountDoc : DynamoDbDocBase
|
|
{
|
|
private static string getPrefixOfPK() { return "ugc_npc_like_selectee_count#"; }
|
|
private static string getPrefixOfSK() { return ""; }
|
|
|
|
public UgcNpcLikeSelecteeCountDoc()
|
|
: base(typeof(UgcNpcLikeSelecteeCountDoc).Name)
|
|
{
|
|
appendAttribWrapperAll();
|
|
}
|
|
|
|
public UgcNpcLikeSelecteeCountDoc(OwnerEntityType ownerEntityType, string ownerGuid)
|
|
: base(typeof(UgcNpcLikeSelecteeCountDoc).Name)
|
|
{
|
|
setCombinationKeyForPK(ownerGuid);
|
|
|
|
appendAttribWrapperAll();
|
|
|
|
fillUpPrimaryKey(onMakePK(), onMakeSK());
|
|
|
|
var doc_ugc_npc_like_selectee_count_attrib = getAttrib<UgcNpcLikeSelecteeCountAttrib>();
|
|
NullReferenceCheckHelper.throwIfNull(doc_ugc_npc_like_selectee_count_attrib, () => $"doc_ugc_npc_like_selectee_count_attrib is null !!! - ownerGuid:{ownerGuid}, ownerEntityType:{ownerEntityType}");
|
|
|
|
setQueryType(QueryType.Insert);
|
|
|
|
doc_ugc_npc_like_selectee_count_attrib.OwnerGuid = ownerGuid;
|
|
doc_ugc_npc_like_selectee_count_attrib.OwnerEntityType = ownerEntityType;
|
|
}
|
|
|
|
private void appendAttribWrapperAll()
|
|
{
|
|
appendAttribWrapper(new AttribWrapper<UgcNpcLikeSelecteeCountAttrib>());
|
|
}
|
|
|
|
protected override string onGetPrefixOfPK()
|
|
{
|
|
return getPrefixOfPK();
|
|
}
|
|
|
|
protected override string onGetPrefixOfSK()
|
|
{
|
|
return getPrefixOfSK();
|
|
}
|
|
}
|