초기커밋
This commit is contained in:
70
ServerCommon/Doc/LandBase/LandDoc.cs
Normal file
70
ServerCommon/Doc/LandBase/LandDoc.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
using META_ID = System.UInt32;
|
||||
using OWNER_GUID = System.String;
|
||||
|
||||
|
||||
using ServerBase;
|
||||
|
||||
|
||||
namespace ServerCommon;
|
||||
|
||||
public class LandAttrib : AttribBase
|
||||
{
|
||||
[JsonProperty("land_meta_id")]
|
||||
public META_ID LandMetaId { get; set; } = 0;
|
||||
|
||||
[JsonProperty("land_name")]
|
||||
public string LandName { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("description")]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("owner_user_guid")]
|
||||
public string OwnerUserGuid { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public LandAttrib()
|
||||
: base(typeof(LandAttrib).Name)
|
||||
{ }
|
||||
}
|
||||
|
||||
//=============================================================================================
|
||||
// PK(Partition Key) : "land#land_meta_id"
|
||||
// SK(Sort Key) : ""
|
||||
// DocType : LandDoc
|
||||
// LandAttrib : {}
|
||||
// ...
|
||||
//=============================================================================================
|
||||
public class LandDoc : DynamoDbDocBase
|
||||
{
|
||||
private static string getPrefixOfPK() { return "land#"; }
|
||||
private static string getPrefixOfSK() { return ""; }
|
||||
|
||||
public LandDoc()
|
||||
: base(typeof(LandDoc).Name)
|
||||
{
|
||||
appendAttribWrapperAll();
|
||||
}
|
||||
|
||||
public LandDoc(META_ID landMetaId)
|
||||
: base(typeof(LandDoc).Name)
|
||||
{
|
||||
setCombinationKeyForPK(landMetaId.ToString());
|
||||
|
||||
appendAttribWrapperAll();
|
||||
|
||||
fillUpPrimaryKey(onMakePK(), onMakeSK());
|
||||
}
|
||||
|
||||
private void appendAttribWrapperAll()
|
||||
{
|
||||
appendAttribWrapper(new AttribWrapper<LandAttrib>());
|
||||
}
|
||||
|
||||
protected override string onGetPrefixOfPK()
|
||||
{
|
||||
return getPrefixOfPK();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user