71 lines
2.4 KiB
C#
71 lines
2.4 KiB
C#
//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 SystemMailInfo
|
|
// {
|
|
// public int Id = 0;
|
|
// public string title = string.Empty;
|
|
// public string text = string.Empty;
|
|
// public string senderNickName = string.Empty;
|
|
// public Timestamp startTime = new();
|
|
// public Timestamp endTime = new();
|
|
// public List<MailItem> ItemList = new();
|
|
// }
|
|
|
|
// public class SystemMailEntityAttr
|
|
// {
|
|
// public List<SystemMailInfo> SystemMailList = new ();
|
|
// }
|
|
|
|
// public class SystemMailEntity
|
|
// {
|
|
// public string PK_Empty { get; private set; } = string.Empty;
|
|
// public string SK_Empty { get; private set; } = string.Empty;
|
|
// public SystemMailEntityAttr Attr { get; private set; } = new();
|
|
|
|
// public SystemMailEntity()
|
|
// {
|
|
// }
|
|
// public SystemMailEntity(Document document)
|
|
// {
|
|
// ReadFrom(document);
|
|
// }
|
|
|
|
// protected void ReadFrom(Document document)
|
|
// {
|
|
// PK_Empty = document["PK"].AsString().Replace(MainDB.GetPKPrefix(EEntityType.SystemMail), "");
|
|
// SK_Empty = document["SK"].AsString().Replace(MainDB.GetSKPrefix(EEntityType.SystemMail), "");
|
|
|
|
// SystemMailEntityAttr? attr = JsonConvert.DeserializeObject<SystemMailEntityAttr>(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.SystemMail, PK_Empty);
|
|
// document["SK"] = MainDB.MakeSK(EEntityType.SystemMail, SK_Empty);
|
|
// document["Attr"] = JsonConvert.SerializeObject(Attr);
|
|
// return document;
|
|
// }
|
|
// public Document DocumentForDelete()
|
|
// {
|
|
// var document = new Document();
|
|
// document["PK"] = MainDB.MakePK(EEntityType.SystemMail, PK_Empty);
|
|
// document["SK"] = MainDB.MakeSK(EEntityType.SystemMail, SK_Empty);
|
|
// return document;
|
|
// }
|
|
// }
|
|
//}
|