//using Newtonsoft.Json; //using System; //using System.Collections.Generic; //using System.Linq; //using System.Text; //using System.Threading.Tasks; //using Amazon.DynamoDBv2.DocumentModel; //using Google.Protobuf.WellKnownTypes; //namespace ServerCommon.DB //{ // public class NoticeChatEntityAttr // { // public List noticeList = new(); // } // public class NoticeChatInfo // { // public int Id = 0; // public Timestamp startTime = new(); // public int repeatMinuteTime = 0; // public int repeatCount = 0; // public string sender = string.Empty; // public int messageType = 0; // public List detailInfos = new(); // } // public class DetailInfo // { // public LanguageType language = LanguageType.None; // public string chatMessage = string.Empty; // } // public class NoticeChatEntity // { // public string PK_Empty { get; private set; } = string.Empty; // public string SK_Empty { get; private set; } = string.Empty; // public NoticeChatEntityAttr Attr { get; private set; } = new(); // public NoticeChatEntity() // { // } // public NoticeChatEntity(Document document) // { // ReadFrom(document); // } // protected void ReadFrom(Document document) // { // PK_Empty = document["PK"].AsString().Replace(MainDB.GetPKPrefix(EEntityType.NoticeChat), ""); // SK_Empty = document["SK"].AsString().Replace(MainDB.GetSKPrefix(EEntityType.NoticeChat), ""); // NoticeChatEntityAttr? attr = JsonConvert.DeserializeObject(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.NoticeChat, PK_Empty); // document["SK"] = MainDB.MakeSK(EEntityType.NoticeChat, SK_Empty); // document["Attr"] = JsonConvert.SerializeObject(Attr); // return document; // } // public Document DocumentForDelete() // { // var document = new Document(); // document["PK"] = MainDB.MakePK(EEntityType.NoticeChat, PK_Empty); // document["SK"] = MainDB.MakeSK(EEntityType.NoticeChat, SK_Empty); // return document; // } // } //}