using System.ComponentModel.DataAnnotations;
namespace Nuuru.Server.Models.Messaging
{
public class Message
{
public int Id { get; set; }
///
/// Original BBCode content (for editing)
///
[Required]
[MaxLength(50000)]
public string ContentRaw { get; set; } = string.Empty;
///
/// Parsed and sanitized HTML (for display)
///
[Required]
public string ContentHtml { get; set; } = string.Empty;
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime? EditedAt { get; set; }
// Conversation relationship
public Guid ConversationId { get; set; }
public Conversation Conversation { get; set; } = null!;
// Author relationship
public Guid AuthorId { get; set; }
public ApplicationUser Author { get; set; } = null!;
// Mentions
public ICollection Mentions { get; set; } = [];
}
}