66 lines
1.9 KiB
C#
66 lines
1.9 KiB
C#
namespace BrokerCore.Entity.Actions;
|
|
|
|
using ServerCommon;
|
|
|
|
using ServerCore; using ServerBase;
|
|
|
|
public record class MailSendOption
|
|
{
|
|
//==================
|
|
// 기본 속성들
|
|
//==================
|
|
public string ReceiverUserGuid { get; set; } = string.Empty;
|
|
public string ReceiverNickName { get; set; } = string.Empty;
|
|
public string SenderNickName { get; set; } = string.Empty;
|
|
public string SenderGuid { get; set; } = string.Empty;
|
|
public string Title { get; set; } = string.Empty;
|
|
public string Text { get; set; } = string.Empty;
|
|
public List<string> ContentsArguments { get; set; } = new List<string>();
|
|
public bool IsTextByMetaData { get; set; } = true;
|
|
public List<ServerCommon.MailItem> ItemList { get; set; } = new List<ServerCommon.MailItem>();
|
|
public DateTime ExpireDate { get; set; } = DateTimeHelper.MaxTime;
|
|
public string PackageOrderId { get; set; } = string.Empty;
|
|
|
|
//==================
|
|
// 추가 옵션들
|
|
//==================
|
|
public bool IsSystemMail { get; set; } = true;
|
|
public string PlanetId { get; set; } = string.Empty;
|
|
public string AccountId { get; set; } = string.Empty;
|
|
|
|
//==================
|
|
// 기본 생성자
|
|
//==================
|
|
public MailSendOption() { }
|
|
|
|
//==================
|
|
// 필수 항목을 포함한 생성자
|
|
//==================
|
|
public MailSendOption(string receiverUserGuid, string receiverNickName, string title, string text)
|
|
{
|
|
ReceiverUserGuid = receiverUserGuid;
|
|
ReceiverNickName = receiverNickName;
|
|
Title = title;
|
|
Text = text;
|
|
}
|
|
|
|
//==================
|
|
// 아이템 목록 추가 메서드
|
|
//==================
|
|
public void addItems(List<MailItem>? mailItems)
|
|
{
|
|
if (mailItems != null)
|
|
{
|
|
ItemList.AddRange(mailItems);
|
|
}
|
|
}
|
|
|
|
//==================
|
|
// 기본값 검증 메서드
|
|
//==================
|
|
public bool validate()
|
|
{
|
|
return !string.IsNullOrEmpty(ReceiverUserGuid) && !string.IsNullOrEmpty(Title);
|
|
}
|
|
}
|