54 lines
1.4 KiB
C#
54 lines
1.4 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace Lagerbestand.Models;
|
|
|
|
/// <summary>
|
|
/// Represents a column in the Kanban board (e.g., Backlog, ToDo, In Progress)
|
|
/// </summary>
|
|
public class KanbanColumn
|
|
{
|
|
public Guid Id { get; set; } = Guid.NewGuid();
|
|
|
|
[Required]
|
|
[MaxLength(100)]
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Display order of the column (0-based)
|
|
/// </summary>
|
|
public int SortOrder { get; set; }
|
|
|
|
/// <summary>
|
|
/// Optional color for the column header
|
|
/// </summary>
|
|
[MaxLength(7)]
|
|
public string? Color { get; set; }
|
|
|
|
/// <summary>
|
|
/// Optional icon/emoji for the column
|
|
/// </summary>
|
|
[MaxLength(10)]
|
|
public string? Icon { get; set; }
|
|
|
|
/// <summary>
|
|
/// Whether this is the default column for new tasks
|
|
/// </summary>
|
|
public bool IsDefault { get; set; }
|
|
|
|
/// <summary>
|
|
/// Whether this column represents completed tasks (for archiving logic)
|
|
/// </summary>
|
|
public bool IsCompletedColumn { get; set; }
|
|
|
|
/// <summary>
|
|
/// Whether this column is active
|
|
/// </summary>
|
|
public bool IsActive { get; set; } = true;
|
|
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
|
|
|
// Navigation properties
|
|
public virtual ICollection<KanbanTask> Tasks { get; set; } = new List<KanbanTask>();
|
|
}
|