초기커밋

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,55 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using System.Threading.Tasks;
//using Amazon.DynamoDBv2.DocumentModel;
//using Newtonsoft.Json;
//namespace ServerCommon.DB
//{
// public class BuildingAttr
// {
// public string Owner = string.Empty;
// public string Name = string.Empty;
// public string Description = string.Empty;
// public Dictionary<int, int> FloorInfo = new Dictionary<int, int>();
// public Dictionary<string, AnchorProp> PropInfo = new();
// }
// public class BuildingEntity
// {
// public int PK_Id { get; private set; } = 0;
// public int SK_Id { get; private set; } = 0;
// public BuildingAttr Attr { get; private set; } = new();
// public BuildingEntity(Document document)
// {
// ReadFrom(document);
// }
// void ReadFrom(Document document)
// {
// if (!int.TryParse(document["PK"].AsString().Replace(MainDB.GetPKPrefix(EEntityType.Building), ""), out var pk))
// throw new Exception("PK int.TryParse error");
// if (!int.TryParse(document["SK"].AsString().Replace(MainDB.GetSKPrefix(EEntityType.Building), ""), out var sk))
// throw new Exception("SK int.TryParse error");
// BuildingAttr? attr = JsonConvert.DeserializeObject<BuildingAttr>(document["Attr"].AsString());
// if (attr == null)
// throw new Exception("Attr DeserializeObject error");
// Attr = attr;
// }
// public Document DocumentForUpdate()
// {
// var document = new Document();
// document["PK"] = MainDB.MakePK(EEntityType.Building, PK_Id.ToString());
// document["SK"] = MainDB.MakeSK(EEntityType.Building, SK_Id.ToString());
// document["Attr"] = JsonConvert.SerializeObject(Attr);
// return document;
// }
// }
//}