using System.Collections.Generic;
using Fantasy.DataStructure.Collection;
using Fantasy.Entitas;
using Fantasy.Helper;
using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson.Serialization.Options;
namespace NB.Chat;
///
/// 玩家邮件组件
///
public class MailComponent : Entity
{
///
/// 最大邮件数据
///
public const int MaxMailCount = 50;
///
/// 邮件最大保留时间
///
public const long MaxExpireTime = TimeHelper.OneDay * 365;
///
/// 邮件列表
///
[BsonDictionaryOptions(DictionaryRepresentation.ArrayOfArrays)]
public Dictionary Mails = new Dictionary();
///
/// 按照时间进行排序
///
[BsonIgnore] public readonly SortedOneToManyListPool Timer = new SortedOneToManyListPool();
}