using Fantasy.Entitas;
using MongoDB.Bson.Serialization.Attributes;
using NB.Game;

namespace NB.Chat;

public sealed class Mail : Entity
{
    /// <summary>
    /// 邮件发送者
    /// </summary>
    [BsonElement("send")] public long Sender;

    /// <summary>
    /// 邮件拥有者
    /// </summary>
    [BsonElement("owner")] public long OwnerId;

    /// <summary>
    /// 邮件状态
    /// </summary>
    [BsonElement("state")] public MailState State = MailState.None;

    /// <summary>
    /// 邮件状态
    /// </summary>
    [BsonElement("type")] public MailType MailType = MailType.None;

    /// <summary>
    /// 邮件内容
    /// </summary>
    [BsonElement("con")] public string Content;

    /// <summary>
    /// 创建时间
    /// </summary>
    [BsonElement("ct")] public long CreateTime;

    /// <summary>
    /// 过期时间
    /// </summary>
    [BsonElement("et")] public long ExpireTime;

    /// <summary>
    /// 邮件的附件内容
    /// </summary>
    [BsonElement("item")] public List<AwardItem> Items = new List<AwardItem>();
}