62 lines
2.1 KiB
C#
62 lines
2.1 KiB
C#
//using System;
|
|
//using System.Collections.Generic;
|
|
//using System.Linq;
|
|
//using System.Text;
|
|
//using System.Threading.Tasks;
|
|
//using Amazon.DynamoDBv2.DocumentModel;
|
|
using Google.Protobuf.WellKnownTypes;
|
|
//using Newtonsoft.Json;
|
|
|
|
namespace ServerCommon.DB
|
|
{
|
|
public class QuestMailEntityAttr
|
|
{
|
|
public bool isRead;
|
|
public int questId;
|
|
public Timestamp createTime = new();
|
|
}
|
|
|
|
// public class QuestMailEntity
|
|
// {
|
|
// public string PK_Guid { get; private set; } = string.Empty;
|
|
// public string SK_Id { get; private set; } = string.Empty;
|
|
// public QuestMailEntityAttr Attr { get; private set; } = new();
|
|
//
|
|
// public QuestMailEntity() { }
|
|
//
|
|
// public QuestMailEntity(Document document)
|
|
// {
|
|
// ReadFrom(document);
|
|
// }
|
|
//
|
|
// protected void ReadFrom(Document document)
|
|
// {
|
|
// // PK_Guid = document["PK"].AsString().Replace(MainDB.GetPKPrefix(EEntityType.QuestMail), "");
|
|
// // SK_Id = document["SK"].AsString().Replace(MainDB.GetSKPrefix(EEntityType.QuestMail), "");
|
|
// //
|
|
// // QuestMailEntityAttr? attr = JsonConvert.DeserializeObject<QuestMailEntityAttr>(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.QuestMail, PK_Guid);
|
|
// // document["SK"] = MainDB.MakeSK(EEntityType.QuestMail, SK_Id);
|
|
// // document["Attr"] = JsonConvert.SerializeObject(Attr);
|
|
// return document;
|
|
// }
|
|
// // public Document DocumentForDelete()
|
|
// // {
|
|
// // var document = new Document();
|
|
// // document["PK"] = MainDB.MakePK(EEntityType.QuestMail, PK_Guid);
|
|
// // document["SK"] = MainDB.MakeSK(EEntityType.QuestMail, SK_Id);
|
|
// // return document;
|
|
// // }
|
|
// }
|
|
|
|
|
|
}
|