초기커밋
This commit is contained in:
87
ServerCommon/Doc/OwnerContents/MailProfileDoc.cs
Normal file
87
ServerCommon/Doc/OwnerContents/MailProfileDoc.cs
Normal file
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
|
||||
using ServerCore;
|
||||
using ServerBase;
|
||||
|
||||
|
||||
|
||||
using SESSION_ID = System.Int32;
|
||||
using META_ID = System.UInt32;
|
||||
using ENTITY_GUID = System.String;
|
||||
using ACCOUNT_ID = System.String;
|
||||
using OWNER_GUID = System.String;
|
||||
using USER_GUID = System.String;
|
||||
using CHARACTER_GUID = System.String;
|
||||
using ITEM_GUID = System.String;
|
||||
|
||||
|
||||
|
||||
namespace ServerCommon;
|
||||
|
||||
public class MailProfileAttrib : AttribBase
|
||||
{
|
||||
[JsonProperty("send_mail_count")]
|
||||
public Int32 SendMailCount { get; set; } = 0;
|
||||
|
||||
[JsonProperty("send_mail_updateday")]
|
||||
public Int64 SendMailUpdateDay { get; set; } = 0;
|
||||
|
||||
[JsonProperty("last_systemmail_id")]
|
||||
public Int32 LastSystemMailId { get; set; } = 0;
|
||||
|
||||
[JsonProperty("received_system_mails")]
|
||||
public Dictionary<Int32, DateTime> ReceivedSystemMails { get; set; } = new();
|
||||
|
||||
public MailProfileAttrib()
|
||||
: base(typeof(MailProfileAttrib).Name)
|
||||
{ }
|
||||
}
|
||||
|
||||
//=============================================================================================
|
||||
// PK(Partition Key) : "mail_profile#user_guid"
|
||||
// SK(Sort Key) : ""
|
||||
// DocType : MailProfileDoc
|
||||
// MailProfileAttrib : {}
|
||||
// ...
|
||||
//=============================================================================================
|
||||
|
||||
public class MailProfileDoc : DynamoDbDocBase
|
||||
{
|
||||
public MailProfileDoc()
|
||||
: base(typeof(MailProfileDoc).Name)
|
||||
{
|
||||
appendAttribWrapperAll();
|
||||
}
|
||||
|
||||
public MailProfileDoc(string ownerGuid)
|
||||
: base(typeof(MailProfileDoc).Name)
|
||||
{
|
||||
setCombinationKeyForPK(ownerGuid);
|
||||
|
||||
appendAttribWrapperAll();
|
||||
|
||||
fillUpPrimaryKey(onMakePK(), onMakeSK());
|
||||
|
||||
setExceptionHandler(new DynamoDbQueryExceptionNotifier.ExceptionHandler(DynamoDbQueryExceptionNotifier.ConditionalCheckFailed, ServerErrorCode.MailProfileDocException));
|
||||
}
|
||||
|
||||
private void appendAttribWrapperAll()
|
||||
{
|
||||
appendAttribWrapper(new AttribWrapper<MailProfileAttrib>());
|
||||
}
|
||||
|
||||
protected override string onGetPrefixOfPK()
|
||||
{
|
||||
return "mail_profile#";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user