using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;

namespace MailApi.Models;

public class MailMessage
{
    [BsonId]
    [BsonRepresentation(BsonType.ObjectId)]
    public string? Id { get; set; }

    [BsonElement("senderCharacterId")]
    public string SenderCharacterId { get; set; } = string.Empty;

    [BsonElement("senderCharacterName")]
    public string SenderCharacterName { get; set; } = string.Empty;

    [BsonElement("recipientCharacterId")]
    public string RecipientCharacterId { get; set; } = string.Empty;

    [BsonElement("recipientCharacterName")]
    public string RecipientCharacterName { get; set; } = string.Empty;

    [BsonElement("subject")]
    public string Subject { get; set; } = string.Empty;

    [BsonElement("body")]
    public string Body { get; set; } = string.Empty;

    [BsonElement("createdUtc")]
    public DateTime CreatedUtc { get; set; } = DateTime.UtcNow;

    [BsonElement("readUtc")]
    public DateTime? ReadUtc { get; set; }
}
