using System.ComponentModel.DataAnnotations; namespace Lagerbestand.Models; /// /// Type of comment (chat message or system activity) /// public enum KanbanCommentType { Chat = 0, Activity = 1 } /// /// Represents a chat message or activity log entry on a Kanban task /// public class KanbanTaskComment { public Guid Id { get; set; } = Guid.NewGuid(); public Guid TaskId { get; set; } /// /// User who created the comment (null for system activities) /// public Guid? UserId { get; set; } [Required] public string Content { get; set; } = string.Empty; /// /// Whether this is a chat message or system activity /// public KanbanCommentType CommentType { get; set; } = KanbanCommentType.Chat; public DateTime CreatedAt { get; set; } = DateTime.UtcNow; // Navigation properties public virtual KanbanTask? Task { get; set; } public virtual AppUser? User { get; set; } // Computed properties public bool IsActivity => CommentType == KanbanCommentType.Activity; public bool IsChat => CommentType == KanbanCommentType.Chat; }