초기커밋

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,130 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Google.Protobuf.WellKnownTypes;
using Newtonsoft.Json;
using ServerCore; using ServerBase;
using SESSION_ID = System.Int32;
using WORLD_ID = System.UInt32;
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 USER_NICKNAME = System.String;
using CHARACTER_GUID = System.String;
using ITEM_GUID = System.String;
using ENTITY_UNIQUE_ID = System.String;
using ANCHOR_META_GUID = System.String;
using LOCATION_UNIQUE_ID = System.String;
using NPC_UNIQUE_ID = System.String;
using FARMING_ENTITY_GUID = System.String;
using FARMING_EFFECT_DOC_LINK_PKSK = System.String;
namespace ServerCommon
{
public class FarmingEffectLocationInTargetAttrib : AttribBase
{
[JsonProperty("location_unique_id")] //[PK 참조]
public LOCATION_UNIQUE_ID LocationUniqueId { get; set; } = string.Empty;
[JsonProperty("anchor_meta_guid")]
public ANCHOR_META_GUID AnchorMetaGuid { get; set; } = string.Empty;
[JsonProperty("owner_user_guid")]
public USER_GUID UserGuid { get; set; } = string.Empty;
[JsonProperty("owner_user_nickname")]
public USER_NICKNAME UserNickname { get; set; } = string.Empty;
[JsonProperty("farming_effect_doc_link_pk_sk")]
public FARMING_EFFECT_DOC_LINK_PKSK FarmingEffectDocLinkPKSK { get; set; } = string.Empty;
public FarmingEffectLocationInTargetAttrib()
: base(typeof(FarmingEffectLocationInTargetAttrib).Name, false)
{ }
}
//=============================================================================================
// Primary Key
// PK(Partition Key) : "farming_effect_location#{LOCATION_UNIQUE_ID}" [LOCATION_UNIQUE_ID.InstanceNumber: ChannelNo, RoomId]
// SK(Sort Key) : "FARMING_EFFECT_DOC_LINK_PKSK"
// DocType : "FarmingEffectLocationInTargetDoc"
// FarmingLocationInTargetAttrib : {}
// ...
//=============================================================================================
public class FarmingEffectLocationInTargetDoc : DynamoDbDocBase
{
private static string getDocTypeName() { return typeof(FarmingEffectLocationInTargetDoc).Name; }
private string getPrefixOfPK() { return $"farming_effect_location#"; }
private string getPrefixOfSK() { return ""; }
public FarmingEffectLocationInTargetDoc()
: base(getDocTypeName())
{
appendAttribWrapperAll();
}
public FarmingEffectLocationInTargetDoc(LOCATION_UNIQUE_ID locationUniqueId, FARMING_EFFECT_DOC_LINK_PKSK farmingEffectDocLinkPKSK = "")
: base(getDocTypeName())
{
setCombinationKeyForPK(locationUniqueId);
setCombinationKeyForSK(farmingEffectDocLinkPKSK);
appendAttribWrapperAll();
fillUpPrimaryKey(onMakePK(), onMakeSK());
}
public FarmingEffectLocationInTargetDoc( LOCATION_UNIQUE_ID locationUniqueId
, ANCHOR_META_GUID anchorMetaGuid, USER_GUID userGuid, USER_NICKNAME userNickname
, FARMING_EFFECT_DOC_LINK_PKSK farmingEffectDocLinkPKSK )
: base(getDocTypeName())
{
setCombinationKeyForPK(locationUniqueId);
setCombinationKeyForSK(farmingEffectDocLinkPKSK);
appendAttribWrapperAll();
fillUpPrimaryKey(onMakePK(), onMakeSK());
var farming_effect_location_in_target_attrib = getAttrib<FarmingEffectLocationInTargetAttrib>();
NullReferenceCheckHelper.throwIfNull(farming_effect_location_in_target_attrib, () => $"farming_effect_location_in_target_attrib is null !!!");
farming_effect_location_in_target_attrib.LocationUniqueId = locationUniqueId;
farming_effect_location_in_target_attrib.AnchorMetaGuid = anchorMetaGuid;
farming_effect_location_in_target_attrib.UserGuid = userGuid;
farming_effect_location_in_target_attrib.UserNickname = userNickname;
farming_effect_location_in_target_attrib.FarmingEffectDocLinkPKSK = farmingEffectDocLinkPKSK;
}
private void appendAttribWrapperAll()
{
appendAttribWrapper(new AttribWrapper<FarmingEffectLocationInTargetAttrib>());
}
protected override string onGetPrefixOfPK()
{
return getPrefixOfPK();
}
protected override ServerErrorCode onCheckAndSetSK(string sortKey)
{
getPrimaryKey().fillUpSK(sortKey);
setCombinationKeyForSK(sortKey);
return ServerErrorCode.Success;
}
}
}

View File

@@ -0,0 +1,136 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Google.Protobuf.WellKnownTypes;
using Newtonsoft.Json;
using ServerCore;
using ServerBase;
using ENTITY_UNIQUE_ID = System.String;
using ANCHOR_META_GUID = System.String;
using LOCATION_UNIQUE_ID = System.String;
using NPC_UNIQUE_ID = System.String;
using OWNER_GUID = System.String;
namespace ServerCommon;
public class NpcLocationInTargetAttrib : AttribBase
{
[JsonProperty("location_unique_id")] //[PK 참조]
public LOCATION_UNIQUE_ID LocationUniqueId { get; set; } = string.Empty;
[JsonProperty("anchor_meta_guid")] //[SK 참조]
public ANCHOR_META_GUID AnchorMetaGuid { get; set; } = string.Empty;
[JsonProperty("npc_type")]
public EntityType NpcType { get; set; } = 0;
[JsonProperty("npc_unique_id")] //[EntityType.Beacon: UgcNpcMetaGuid]
public NPC_UNIQUE_ID NpcUniqueId { get; set; } = string.Empty;
[JsonProperty("npc_location")]
public NpcLocation NpcLocation { get; set; } = new NpcLocation();
[JsonProperty("owner_entity_type")]
public OwnerEntityType OwnerEntityType { get; set; } = OwnerEntityType.None;
[JsonProperty("owner_guid")]
public OWNER_GUID OwnerGuid { get; set; } = string.Empty;
public NpcLocationInTargetAttrib()
: base(typeof(NpcLocationInTargetAttrib).Name, false)
{ }
}
//=============================================================================================
// Primary Key
// PK(Partition Key) : "npc_location#{LOCATION_UNIQUE_ID}" [LOCATION_UNIQUE_ID.InstanceNumber: MyHomeMetaGuid, RoomId]
// SK(Sort Key) : "anchor_meta_guid"
// DocType : "NpcLocationInTargetDoc"
// NpcLocationInTargetAttrib : {}
// ...
//=============================================================================================
public class NpcLocationInTargetDoc : DynamoDbDocBase
{
private static string getDocTypeName() { return typeof(NpcLocationInTargetDoc).Name; }
private string getPrefixOfPK() { return $"npc_location#"; }
private string getPrefixOfSK() { return ""; }
public NpcLocationInTargetDoc()
: base(getDocTypeName())
{
appendAttribWrapperAll();
}
public NpcLocationInTargetDoc(LOCATION_UNIQUE_ID locationUniqueId)
: base(getDocTypeName())
{
setCombinationKeyForPK(locationUniqueId);
appendAttribWrapperAll();
fillUpPrimaryKey(onMakePK(), onMakeSK());
}
public NpcLocationInTargetDoc(LOCATION_UNIQUE_ID locationUniqueId, ANCHOR_META_GUID anchorMetaGuid)
: base(getDocTypeName())
{
setCombinationKeyForPK(locationUniqueId);
setCombinationKeyForSK(anchorMetaGuid);
appendAttribWrapperAll();
fillUpPrimaryKey(onMakePK(), onMakeSK());
}
public NpcLocationInTargetDoc( LOCATION_UNIQUE_ID locationUniqueId, ANCHOR_META_GUID anchorMetaGuid
, EntityType npcType, NPC_UNIQUE_ID npcUniqueId, NpcLocation npcLocation
, OwnerEntityType ownerEntityType, OWNER_GUID ownerGuid )
: base(getDocTypeName())
{
setCombinationKeyForPK(locationUniqueId);
setCombinationKeyForSK(anchorMetaGuid);
appendAttribWrapperAll();
fillUpPrimaryKey(onMakePK(), onMakeSK());
var npc_location_in_target_attrib = getAttrib<NpcLocationInTargetAttrib>();
ArgumentNullException.ThrowIfNull(npc_location_in_target_attrib, $"npc_location_in_target_attrib is null !!!");
npc_location_in_target_attrib.LocationUniqueId = locationUniqueId;
npc_location_in_target_attrib.AnchorMetaGuid = anchorMetaGuid;
npc_location_in_target_attrib.NpcType = npcType;
npc_location_in_target_attrib.NpcUniqueId = npcUniqueId;
npc_location_in_target_attrib.NpcLocation = npcLocation;
npc_location_in_target_attrib.OwnerEntityType = ownerEntityType;
npc_location_in_target_attrib.OwnerGuid = ownerGuid;
}
private void appendAttribWrapperAll()
{
appendAttribWrapper(new AttribWrapper<NpcLocationInTargetAttrib>());
}
protected override string onGetPrefixOfPK()
{
return getPrefixOfPK();
}
protected override ServerErrorCode onCheckAndSetSK(string sortKey)
{
getPrimaryKey().fillUpSK(sortKey);
setCombinationKeyForSK(sortKey);
return ServerErrorCode.Success;
}
}