Initial commit: Lagerbestand Blazor Projekt
This commit is contained in:
commit
cba9414e92
105 files changed
+36431
No files matched your search
@@ -0,0 +1,45 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Lagerbestand.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Type of comment (chat message or system activity)
|
||||
/// </summary>
|
||||
public enum KanbanCommentType
|
||||
{
|
||||
Chat = 0,
|
||||
Activity = 1
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a chat message or activity log entry on a Kanban task
|
||||
/// </summary>
|
||||
public class KanbanTaskComment
|
||||
{
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
|
||||
public Guid TaskId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// User who created the comment (null for system activities)
|
||||
/// </summary>
|
||||
public Guid? UserId { get; set; }
|
||||
|
||||
[Required]
|
||||
public string Content { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this is a chat message or system activity
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
Reference in new issue
Block a user