namespace QMax.Api.Data.Entities; public sealed class Chat { public Guid Id { get; set; } = Guid.NewGuid(); public string? ExternalId { get; set; } public ChatKind Kind { get; set; } = ChatKind.MaxDialog; public string Title { get; set; } = "MAX chat"; public string? AvatarUrl { get; set; } public string? LastMessagePreview { get; set; } public DateTimeOffset? LastMessageAt { get; set; } public int UnreadCount { get; set; } public bool IsPinned { get; set; } public bool IsMuted { get; set; } public bool IsArchived { get; set; } public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow; public DateTimeOffset UpdatedAt { get; set; } = DateTimeOffset.UtcNow; public ICollection Messages { get; set; } = new List(); }