using Fantasy.DataStructure.Collection; using Fantasy.Entitas; using MongoDB.Bson.Serialization.Attributes; using MongoDB.Bson.Serialization.Options; namespace Fantasy; /// /// 这个代表一个用户身上所有邮件的组件 /// public sealed class MailComponent : Entity { // 最大的邮件数量 public const int MaxMailCount = 50; // 邮件的过期时间,这个是过期7天时间。 public const int MailExpireTime = 1000 * 60 * 60 * 24 * 7; // 玩家的邮件 [BsonDictionaryOptions(DictionaryRepresentation.ArrayOfArrays)] public Dictionary Mails = new Dictionary(); // 按照时间进行排序 [BsonIgnore] public readonly SortedOneToManyList Timer = new SortedOneToManyList(); }