大修改
This commit is contained in:
34
Entity/Social/Mail/Components/MailComponent.cs
Normal file
34
Entity/Social/Mail/Components/MailComponent.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using Fantasy.DataStructure.Collection;
|
||||
using Fantasy.Entitas;
|
||||
using Fantasy.Helper;
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoDB.Bson.Serialization.Options;
|
||||
|
||||
namespace NB.Game;
|
||||
|
||||
/// <summary>
|
||||
/// 玩家邮件组件
|
||||
/// </summary>
|
||||
public class MailComponent : Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// 最大邮件数据
|
||||
/// </summary>
|
||||
public const int MaxMailCount = 50;
|
||||
|
||||
/// <summary>
|
||||
/// 邮件最大保留时间
|
||||
/// </summary>
|
||||
public const long MaxExpireTime = TimeHelper.OneDay * 365;
|
||||
|
||||
/// <summary>
|
||||
/// 邮件列表
|
||||
/// </summary>
|
||||
[BsonDictionaryOptions(DictionaryRepresentation.ArrayOfArrays)]
|
||||
public Dictionary<long, Mail> Mails = new Dictionary<long, Mail>();
|
||||
|
||||
/// <summary>
|
||||
/// 按照时间进行排序
|
||||
/// </summary>
|
||||
[BsonIgnore] public readonly SortedOneToManyListPool<long, long> Timer = new SortedOneToManyListPool<long, long>();
|
||||
}
|
||||
Reference in New Issue
Block a user