using System.ComponentModel.DataAnnotations;
namespace Nuuru.Server.Models.Messaging
{
public class Conversation
{
public Guid Id { get; set; }
///
/// Optional title for group conversations
///
[MaxLength(200)]
public string? Title { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime LastMessageAt { get; set; } = DateTime.UtcNow;
public int MessageCount { get; set; } = 0;
public bool IsLocked { get; set; } = false;
// Creator relationship
public Guid CreatorId { get; set; }
public ApplicationUser Creator { get; set; } = null!;
// Navigation properties
public ICollection Participants { get; set; } = [];
public ICollection Messages { get; set; } = [];
}
}